{"id":1009784,"date":"2024-12-27T11:14:56","date_gmt":"2024-12-27T03:14:56","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1009784.html"},"modified":"2024-12-27T11:14:59","modified_gmt":"2024-12-27T03:14:59","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e9%ad%94%e6%b3%95%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1009784.html","title":{"rendered":"python\u5982\u4f55\u5b9e\u73b0\u9b54\u6cd5\u6548\u679c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084549\/a6a2a3c8-2727-4eb5-bede-73d445cf424b.webp\" alt=\"python\u5982\u4f55\u5b9e\u73b0\u9b54\u6cd5\u6548\u679c\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u5b9e\u73b0\u9b54\u6cd5\u6548\u679c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u9b54\u6cd5\u65b9\u6cd5\u3001\u88c5\u9970\u5668\u548c\u5143\u7c7b\u7b49\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002\u9b54\u6cd5\u65b9\u6cd5\u80fd\u591f\u6539\u53d8\u5bf9\u8c61\u7684\u9ed8\u8ba4\u884c\u4e3a\u3001\u88c5\u9970\u5668\u63d0\u4f9b\u4e86\u4e00\u79cd\u6e05\u6670\u7684\u65b9\u5f0f\u6765\u4fee\u6539\u51fd\u6570\u6216\u7c7b\u7684\u884c\u4e3a\u3001\u5143\u7c7b\u5219\u53ef\u4ee5\u7528\u4e8e\u4fee\u6539\u7c7b\u7684\u521b\u5efa\u8fc7\u7a0b\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u6280\u672f\u6765\u5b9e\u73b0Python\u4e2d\u7684\u9b54\u6cd5\u6548\u679c\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u9b54\u6cd5\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u9b54\u6cd5\u65b9\u6cd5\uff0c\u4e5f\u79f0\u4e3a\u53cc\u4e0b\u5212\u7ebf\u65b9\u6cd5\u6216\u9b54\u672f\u65b9\u6cd5\uff0c\u662fPython\u4e2d\u7684\u4e00\u79cd\u7279\u6b8a\u65b9\u6cd5\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4ee5\u53cc\u4e0b\u5212\u7ebf\u5f00\u5934\u548c\u7ed3\u5c3e\uff0c\u5982<code>__init__<\/code>\u3001<code>__str__<\/code>\u7b49\u3002\u9b54\u6cd5\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u91cd\u8f7d\u8fd0\u7b97\u7b26\u3001\u5b9a\u4e49\u5bf9\u8c61\u7684\u521d\u59cb\u5316\u884c\u4e3a\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u91cd\u8f7d\u8fd0\u7b97\u7b26<\/strong><\/p>\n<\/p>\n<p><p>\u8fd0\u7b97\u7b26\u91cd\u8f7d\u662f\u6307\u901a\u8fc7\u5b9a\u4e49\u7279\u5b9a\u7684\u9b54\u6cd5\u65b9\u6cd5\u6765\u6539\u53d8\u8fd0\u7b97\u7b26\u7684\u884c\u4e3a\u3002\u4f8b\u5982\uff0c<code>__add__<\/code>\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u91cd\u8f7d\u52a0\u6cd5\u8fd0\u7b97\u7b26<code>+<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Vector:<\/p>\n<p>    def __init__(self, x, y):<\/p>\n<p>        self.x = x<\/p>\n<p>        self.y = y<\/p>\n<p>    def __add__(self, other):<\/p>\n<p>        return Vector(self.x + other.x, self.y + other.y)<\/p>\n<p>    def __str__(self):<\/p>\n<p>        return f&quot;Vector({self.x}, {self.y})&quot;<\/p>\n<p>v1 = Vector(2, 3)<\/p>\n<p>v2 = Vector(5, 7)<\/p>\n<p>print(v1 + v2)  # \u8f93\u51fa: Vector(7, 10)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86<code>__add__<\/code>\u65b9\u6cd5\uff0c\u4f7f\u5f97<code>Vector<\/code>\u5bf9\u8c61\u53ef\u4ee5\u4f7f\u7528<code>+<\/code>\u8fd0\u7b97\u7b26\u8fdb\u884c\u76f8\u52a0\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b9a\u5236\u5bf9\u8c61\u7684\u6253\u5370\u8f93\u51fa<\/strong><\/p>\n<\/p>\n<p><p><code>__str__<\/code>\u548c<code>__repr__<\/code>\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u5b9a\u5236\u5bf9\u8c61\u7684\u6253\u5370\u8f93\u51fa\u3002<code>__str__<\/code>\u7528\u4e8e\u5b9a\u4e49<code>print()<\/code>\u51fd\u6570\u7684\u8f93\u51fa\uff0c\u800c<code>__repr__<\/code>\u7528\u4e8e\u5b9a\u4e49\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u7684\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Person:<\/p>\n<p>    def __init__(self, name, age):<\/p>\n<p>        self.name = name<\/p>\n<p>        self.age = age<\/p>\n<p>    def __str__(self):<\/p>\n<p>        return f&quot;Person(name={self.name}, age={self.age})&quot;<\/p>\n<p>    def __repr__(self):<\/p>\n<p>        return f&quot;Person({self.name!r}, {self.age})&quot;<\/p>\n<p>p = Person(&quot;Alice&quot;, 30)<\/p>\n<p>print(p)  # \u8f93\u51fa: Person(name=Alice, age=30)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u5b9a\u4e49<code>__str__<\/code>\u548c<code>__repr__<\/code>\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u81ea\u5b9a\u4e49<code>Person<\/code>\u5bf9\u8c61\u7684\u6253\u5370\u8f93\u51fa\u683c\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u88c5\u9970\u5668<\/p>\n<\/p>\n<p><p>\u88c5\u9970\u5668\u662fPython\u4e2d\u7684\u4e00\u79cd\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u5141\u8bb8\u5728\u4e0d\u4fee\u6539\u539f\u6709\u51fd\u6570\u6216\u7c7b\u7684\u57fa\u7840\u4e0a\uff0c\u52a8\u6001\u5730\u589e\u52a0\u529f\u80fd\u3002\u88c5\u9970\u5668\u901a\u5e38\u7528\u4e8e\u51fd\u6570\u6216\u65b9\u6cd5\u7684\u524d\u540e\u8fdb\u884c\u4e00\u4e9b\u64cd\u4f5c\uff0c\u5982\u65e5\u5fd7\u8bb0\u5f55\u3001\u6743\u9650\u9a8c\u8bc1\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u51fd\u6570\u88c5\u9970\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u51fd\u6570\u88c5\u9970\u5668\u662f\u7528\u4e8e\u4fee\u9970\u51fd\u6570\u7684\u3002\u4e00\u4e2a\u7b80\u5355\u7684\u51fd\u6570\u88c5\u9970\u5668\u53ef\u4ee5\u5728\u51fd\u6570\u8c03\u7528\u524d\u540e\u6253\u5370\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def log_decorator(func):<\/p>\n<p>    def wrapper(*args, kwargs):<\/p>\n<p>        print(f&quot;Calling function {func.__name__}&quot;)<\/p>\n<p>        result = func(*args, kwargs)<\/p>\n<p>        print(f&quot;Function {func.__name__} returned {result}&quot;)<\/p>\n<p>        return result<\/p>\n<p>    return wrapper<\/p>\n<p>@log_decorator<\/p>\n<p>def add(x, y):<\/p>\n<p>    return x + y<\/p>\n<p>print(add(3, 4))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\u7684<code>log_decorator<\/code>\u5c31\u662f\u4e00\u4e2a\u88c5\u9970\u5668\uff0c\u5b83\u5728<code>add<\/code>\u51fd\u6570\u8c03\u7528\u524d\u540e\u6253\u5370\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7c7b\u88c5\u9970\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u7c7b\u88c5\u9970\u5668\u662f\u7528\u4e8e\u4fee\u9970\u7c7b\u7684\u3002\u5b83\u53ef\u4ee5\u7528\u4e8e\u52a8\u6001\u5730\u4fee\u6539\u7c7b\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add_method(cls):<\/p>\n<p>    cls.new_method = lambda self: print(&quot;New method added!&quot;)<\/p>\n<p>    return cls<\/p>\n<p>@add_method<\/p>\n<p>class Sample:<\/p>\n<p>    pass<\/p>\n<p>s = Sample()<\/p>\n<p>s.new_method()  # \u8f93\u51fa: New method added!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>add_method<\/code>\u88c5\u9970\u5668\u5411<code>Sample<\/code>\u7c7b\u52a8\u6001\u5730\u6dfb\u52a0\u4e86\u4e00\u4e2a\u65b0\u65b9\u6cd5<code>new_method<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u5143\u7c7b<\/p>\n<\/p>\n<p><p>\u5143\u7c7b\u662f\u7528\u4e8e\u521b\u5efa\u7c7b\u7684\u201c\u7c7b\u201d\u3002\u901a\u8fc7\u81ea\u5b9a\u4e49\u5143\u7c7b\uff0c\u6211\u4eec\u53ef\u4ee5\u63a7\u5236\u7c7b\u7684\u521b\u5efa\u8fc7\u7a0b\uff0c\u4ece\u800c\u5b9e\u73b0\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u81ea\u5b9a\u4e49\u5143\u7c7b<\/strong><\/p>\n<\/p>\n<p><p>\u81ea\u5b9a\u4e49\u5143\u7c7b\u53ef\u4ee5\u901a\u8fc7\u7ee7\u627f<code>type<\/code>\u6765\u5b9e\u73b0\u3002\u5143\u7c7b\u7684<code>__new__<\/code>\u6216<code>__init__<\/code>\u65b9\u6cd5\u53ef\u4ee5\u7528\u4e8e\u4fee\u6539\u7c7b\u7684\u5b9a\u4e49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Meta(type):<\/p>\n<p>    def __new__(cls, name, bases, attrs):<\/p>\n<p>        print(f&quot;Creating class {name}&quot;)<\/p>\n<p>        return super(Meta, cls).__new__(cls, name, bases, attrs)<\/p>\n<p>class MyClass(metaclass=Meta):<\/p>\n<p>    pass<\/p>\n<h2><strong>\u8f93\u51fa: Creating class MyClass<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>Meta<\/code>\u662f\u4e00\u4e2a\u81ea\u5b9a\u4e49\u5143\u7c7b\uff0c\u5b83\u5728\u7c7b\u521b\u5efa\u65f6\u6253\u5370\u4e00\u6761\u6d88\u606f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5e94\u7528\u5143\u7c7b<\/strong><\/p>\n<\/p>\n<p><p>\u5143\u7c7b\u53ef\u4ee5\u7528\u4e8e\u5b9e\u73b0\u5355\u4f8b\u6a21\u5f0f\u3001\u63a5\u53e3\u68c0\u67e5\u7b49\u9ad8\u7ea7\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u5355\u4f8b\u6a21\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class SingletonMeta(type):<\/p>\n<p>    _instances = {}<\/p>\n<p>    def __call__(cls, *args, kwargs):<\/p>\n<p>        if cls not in cls._instances:<\/p>\n<p>            cls._instances[cls] = super(SingletonMeta, cls).__call__(*args, kwargs)<\/p>\n<p>        return cls._instances[cls]<\/p>\n<p>class Singleton(metaclass=SingletonMeta):<\/p>\n<p>    def __init__(self):<\/p>\n<p>        self.value = 42<\/p>\n<p>s1 = Singleton()<\/p>\n<p>s2 = Singleton()<\/p>\n<p>print(s1 is s2)  # \u8f93\u51fa: True<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>SingletonMeta<\/code>\u5143\u7c7b\u786e\u4fdd<code>Singleton<\/code>\u7c7b\u53ea\u6709\u4e00\u4e2a\u5b9e\u4f8b\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>Python\u4e2d\u7684\u9b54\u6cd5\u6548\u679c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u9b54\u6cd5\u65b9\u6cd5\u3001\u88c5\u9970\u5668\u548c\u5143\u7c7b\u7b49\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002<strong>\u9b54\u6cd5\u65b9\u6cd5<\/strong>\u63d0\u4f9b\u4e86\u4e00\u79cd\u76f4\u63a5\u7684\u65b9\u5f0f\u6765\u91cd\u8f7d\u8fd0\u7b97\u7b26\u548c\u5b9a\u5236\u5bf9\u8c61\u884c\u4e3a\uff1b<strong>\u88c5\u9970\u5668<\/strong>\u63d0\u4f9b\u4e86\u4e00\u79cd\u4f18\u96c5\u7684\u65b9\u5f0f\u6765\u52a8\u6001\u5730\u4fee\u6539\u51fd\u6570\u6216\u7c7b\u7684\u884c\u4e3a\uff1b<strong>\u5143\u7c7b<\/strong>\u5219\u5141\u8bb8\u6211\u4eec\u6df1\u5165\u63a7\u5236\u7c7b\u7684\u521b\u5efa\u8fc7\u7a0b\uff0c\u5b9e\u73b0\u9ad8\u7ea7\u7684\u529f\u80fd\u3002\u8fd9\u4e9b\u6280\u672f\u7684\u7ed3\u5408\u4f7f\u5f97Python\u6210\u4e3a\u4e00\u4e2a\u7075\u6d3b\u4e14\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u80fd\u591f\u6ee1\u8db3\u4e0d\u540c\u7684\u7f16\u7a0b\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9b\u6280\u672f\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5728Python\u4e2d\u5b9e\u73b0\u8bb8\u591a\u590d\u6742\u800c\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u4ece\u800c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u590d\u7528\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u540c\u65f6\uff0c\u4e5f\u9700\u8981\u6ce8\u610f\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u6280\u672f\uff0c\u4ee5\u514d\u8fc7\u5ea6\u590d\u6742\u5316\u4ee3\u7801\uff0c\u5f71\u54cd\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u89c6\u89c9\u9b54\u6cd5\u6548\u679c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u56fe\u5f62\u5e93\u5982Pygame\u6216Pillow\u6765\u521b\u5efa\u89c6\u89c9\u9b54\u6cd5\u6548\u679c\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ed8\u5236\u7c92\u5b50\u6548\u679c\u3001\u5149\u7ebf\u6216\u5176\u4ed6\u89c6\u89c9\u5143\u7d20\uff0c\u7ed3\u5408\u52a8\u753b\uff0c\u4f7f\u5f97\u6548\u679c\u66f4\u52a0\u751f\u52a8\u3002\u6b64\u5916\uff0c\u4f7f\u7528OpenGL\u7b49\u4e09\u7ef4\u56fe\u5f62\u5e93\u4e5f\u80fd\u591f\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u9b54\u6cd5\u6548\u679c\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u7b80\u5355\u7684\u4ee3\u7801\u793a\u4f8b\u53ef\u4ee5\u53c2\u8003\uff1f<\/strong><br \/>\u5f53\u7136\u53ef\u4ee5\uff01\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Pygame\u751f\u6210\u7b80\u5355\u9b54\u6cd5\u7c92\u5b50\u6548\u679c\u7684\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">import pygame\nimport random\n\npygame.init()\nscreen = pygame.display.set_mode((800, 600))\nclock = pygame.time.Clock()\n\nparticles = []\n\nclass Particle:\n    def __init__(self, x, y):\n        self.x = x\n        self.y = y\n        self.size = random.randint(5, 10)\n        self.color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))\n        self.lifetime = random.randint(20, 100)\n\n    def update(self):\n        self.lifetime -= 1\n        self.y -= 2  # Move up\n        self.x += random.choice([-1, 0, 1])  # Slight horizontal movement\n\n    def draw(self):\n        pygame.draw.circle(screen, self.color, (self.x, self.y), self.size)\n\nwhile True:\n    for event in pygame.event.get():\n        if event.type == pygame.QUIT:\n            pygame.quit()\n            exit()\n\n    if random.random() &lt; 0.1:  # Create a new particle randomly\n        particles.append(Particle(random.randint(400, 600), 500))\n\n    screen.fill((0, 0, 0))  # Clear screen\n    for particle in particles:\n        particle.update()\n        particle.draw()\n        if particle.lifetime &lt;= 0:\n            particles.remove(particle)\n\n    pygame.display.flip()\n    clock.tick(60)\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u6bb5\u5c55\u793a\u4e86\u5982\u4f55\u751f\u6210\u548c\u7ed8\u5236\u7c92\u5b50\uff0c\u521b\u9020\u51fa\u9b54\u6cd5\u822c\u7684\u6548\u679c\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f18\u5316\u9b54\u6cd5\u6548\u679c\u7684\u6027\u80fd\uff1f<\/strong><br \/>\u4e3a\u4e86\u4f18\u5316\u6027\u80fd\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7cbe\u7075\u7ec4\uff08Sprite Groups\uff09\u7ba1\u7406\u7c92\u5b50\uff0c\u8fd9\u6837\u53ef\u4ee5\u6279\u91cf\u66f4\u65b0\u548c\u7ed8\u5236\u3002\u6b64\u5916\uff0c\u51cf\u5c11\u6bcf\u5e27\u751f\u6210\u7684\u7c92\u5b50\u6570\u91cf\uff0c\u6216\u901a\u8fc7\u5408\u5e76\u7c92\u5b50\u4ee5\u51cf\u5c11\u7ed8\u5236\u8c03\u7528\uff0c\u4e5f\u80fd\u63d0\u5347\u6027\u80fd\u3002\u4f7f\u7528\u7b80\u5355\u7684\u56fe\u5f62\u548c\u51cf\u5c11\u590d\u6742\u7684\u8ba1\u7b97\u4e5f\u662f\u6709\u6548\u7684\u65b9\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5b9e\u73b0\u9b54\u6cd5\u6548\u679c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u9b54\u6cd5\u65b9\u6cd5\u3001\u88c5\u9970\u5668\u548c\u5143\u7c7b\u7b49\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002\u9b54\u6cd5\u65b9\u6cd5\u80fd\u591f\u6539\u53d8\u5bf9\u8c61\u7684\u9ed8\u8ba4\u884c\u4e3a\u3001\u88c5 [&hellip;]","protected":false},"author":3,"featured_media":1009786,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1009784"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1009784"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1009784\/revisions"}],"predecessor-version":[{"id":1009790,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1009784\/revisions\/1009790"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1009786"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1009784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1009784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1009784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}