{"id":1685,"date":"2024-03-22T16:03:26","date_gmt":"2024-03-22T10:33:26","guid":{"rendered":"https:\/\/geekpython.in\/?p=1685"},"modified":"2024-04-12T14:09:24","modified_gmt":"2024-04-12T08:39:24","slug":"slash-and-asterisk-in-function","status":"publish","type":"post","link":"https:\/\/geekpython.in\/slash-and-asterisk-in-function","title":{"rendered":"Why Slash and Asterisk Used in Function Definition"},"content":{"rendered":"\n<p>When you read the documentation of some functions you see a slash (<code>\/<\/code>) and an asterisk (<code>*<\/code>) passed in the function definition. Why are they passed in a function?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Slash and Asterisk are Used?<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<p class=\"responsive-video-wrap clr\"><iframe loading=\"lazy\" title=\"What are these (\/ and *) parameters in function? 2MinutesPy\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/WjCBzJT6-Uc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div><\/figure>\n\n\n\n<p>The slash (<code>\/<\/code>) and asterisk (<code>*<\/code>) are used to determine how an argument should pass when a function is called.<\/p>\n\n\n\n<p>Simply said, the <strong>parameters on the left side of the slash (<\/strong><code>\/<\/code><strong>) must be supplied as positional-only arguments<\/strong>, whereas the parameters on the right side can be passed as either positional or keyword arguments.<\/p>\n\n\n\n<p><strong>An asterisk (<\/strong><code>*<\/code><strong>) indicates that the parameters on the right side must be supplied as keyword-only arguments<\/strong>, while the parameters on the left side can be passed as positional or keyword arguments.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69dba7e08fee3&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"600\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2024\/03\/slashasteriskdisplay.png\" alt=\"Visual representation of a function definition containing slash and asterisk indicating positional-only and keyword-only parameters\" class=\"wp-image-1689\" srcset=\"https:\/\/geekpython.in\/wp-content\/uploads\/2024\/03\/slashasteriskdisplay.png 1600w, https:\/\/geekpython.in\/wp-content\/uploads\/2024\/03\/slashasteriskdisplay-300x113.png 300w, https:\/\/geekpython.in\/wp-content\/uploads\/2024\/03\/slashasteriskdisplay-1024x384.png 1024w, https:\/\/geekpython.in\/wp-content\/uploads\/2024\/03\/slashasteriskdisplay-768x288.png 768w, https:\/\/geekpython.in\/wp-content\/uploads\/2024\/03\/slashasteriskdisplay-1536x576.png 1536w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th class=\"has-text-align-center\" data-align=\"center\">Left-side Parameters<\/th><th class=\"has-text-align-center\" data-align=\"center\">Symbol<\/th><th class=\"has-text-align-center\" data-align=\"center\">Right-side Parameters<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><strong>Positional-only arguments<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><code><strong>\/<\/strong><\/code><\/td><td class=\"has-text-align-center\" data-align=\"center\">Either positional or keyword arguments<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Either positional or keyword arguments<\/td><td class=\"has-text-align-center\" data-align=\"center\"><code><strong>*<\/strong><\/code><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Keyword-only arguments<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Slash and Asterisk in Function Parameter<\/h2>\n\n\n\n<p>Here&#8217;s a simple example to show that when slashes and asterisks appear in a function definition, then parameters are bound to positional-only and keyword-only arguments, respectively.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:2 decode:true \"># Normal Function\ndef func_params(x, y, \/, *, z):\n    print(x, y, z)<\/pre><\/div>\n\n\n\n<p>You can conclude that <code>x<\/code> and <code>y<\/code> are positional-only parameters, while <code>z<\/code> is keyword-only. Let&#8217;s experiment to see if the parameters are bound to positional-only and keyword-only arguments.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">params = func_params(2, y=3, z=4)<\/pre><\/div>\n\n\n\n<p>The parameter <code>x<\/code> is supplied as a positional argument, while <code>y<\/code> and <code>z<\/code> are passed as keywords or named arguments. When you run the code, the following output will be produced.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tex decode:true \">Traceback (most recent call last):\n  ...\n    params = func_params(2, y=3, z=4)\n             ^^^^^^^^^^^^^^^^^^^^^^^^\nTypeError: func_params() got some positional-only arguments passed as keyword arguments: 'y'<\/pre><\/div>\n\n\n\n<p>Python raises a <code>TypeError<\/code> indicating that the positional-only parameter (<code>y<\/code>) was given as a keyword argument. If you simply supply <code>y<\/code> as a positional argument, the code will not generate any errors.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \"># Normal Function\ndef func_params(x, y, \/, *, z):\n    print(x, y, z)\n\n# x &amp; y passed as positional argument and z as a keyword argument\nparams = func_params(2, 3, z=4)\n\n--------------------\n2 3 4<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Can Asterisk Be Used Ahead of Slash<\/h2>\n\n\n\n<p>The asterisk (<code>*<\/code>) must come after the slash (<code>\/<\/code>). Now, you may be wondering if this is a rule.<\/p>\n\n\n\n<p>You may think of it as a rule, if you use both a slash and an asterisk, the slash must come before the asterisk, otherwise, Python will throw a syntax error.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:2 decode:true \"># Used asterisk before slash\ndef func_params(x, y, *, \/, z):\n    print(x, y, z)\n\nparams = func_params(2, 3, z=4)<\/pre><\/div>\n\n\n\n<p>The code has been modified, and the asterisk is used before the slash. When you run the code, you&#8217;ll get a syntax error.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tex decode:true \">  ...\n    def func_params(x, y, *, \/, z):\n                             ^\nSyntaxError: \/ must be ahead of *<\/pre><\/div>\n\n\n\n<p>Logically inserting an asterisk before the slash doesn&#8217;t make sense because the parameters on the right side of the asterisk are keyword-only, but the parameters on the left side of the slash are positional-only.<\/p>\n\n\n\n<p>This will not work at all. Here is an example to demonstrate this situation.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \"># Used asterisk before slash\ndef func_params(x, y, *, a, b, \/, z):\n    print(x, y, a, b, z)\n\nparams = func_params(2, 3, a=5, b=6, z=4)<\/pre><\/div>\n\n\n\n<p>The parameters <code>a<\/code> and <code>b<\/code> are between the asterisk and the slash, making it unclear if they are positional or keyword-only parameters. This code will still throw a syntax error even after passing <code>a<\/code> and <code>b<\/code> as keyword arguments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using Either One of Slash (\/) or Asterisk (*) in the Function&#8217;s Parameter?<\/h2>\n\n\n\n<p>You can utilise either one depending on the type of parameters you require, whether positional-only or keyword-only. Here&#8217;s an example showing the use of only a slash (<code>\/<\/code>) in a function definition.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:1 decode:true \">def func_params(pos1, pos2, \/, pos_or_kw):\n    print(pos1, pos2, pos_or_kw)\n\nparams = func_params(2, 3, pos_or_kw=4)\n\n--------------------\n2 3 4<\/pre><\/div>\n\n\n\n<p>The parameters <code>pos1<\/code> and <code>pos2<\/code> are positional-only parameters and <code>pos_or_kw<\/code> is a positional-or-keyword parameter.<\/p>\n\n\n\n<p>Similarly, you can use a bare asterisk (<code>*<\/code>) also in the function definition.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:1 decode:true \">def func_params(pos_or_kw, *, kw1, kw2):\n    print(pos_or_kw, kw1, kw2)\n\nparams = func_params(4, kw1=3, kw2=2)\n\n--------------------\n4 3 2<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Writing a Function that Accepts Positional-only Arguments<\/h3>\n\n\n\n<p>If you want to create a function or class that only accepts positional arguments, add the slash (<code>\/<\/code>) at the end of the parameter list.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:2 decode:true \"># Function that takes only positional arguments\ndef prescription(med1, med2, med3, \/):\n    print(\"Prescribed Meds:\")\n    print(f\"Med 1: {med1}\")\n    print(f\"Med 2: {med2}\")\n    print(f\"Med 3: {med3}\")\n\nprescription(\"Paracetamol\", \"Omeprazole\", \"Ibuprofen\")\n\n--------------------\nPrescribed Meds:\nMed 1: Paracetamol\nMed 2: Omeprazole\nMed 3: Ibuprofen<\/pre><\/div>\n\n\n\n<p>The function <code>prescription()<\/code> takes three arguments: <code>med1<\/code>, <code>med2<\/code>, and <code>med3<\/code>. You can see that a slash (<code>\/<\/code>) is written at the end of the parameters which makes them positional-only.<\/p>\n\n\n\n<p>You&#8217;ll get an error if you try to pass a keyword argument to the function <code>prescription()<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:1 decode:true \">prescription(\"Paracetamol\", \"Omeprazole\", med3=\"Ibuprofen\")\n--------------------\nTraceback (most recent call last):\n  ...\n    prescription(\"Paracetamol\", \"Omeprazole\", med3=\"Ibuprofen\")\nTypeError: prescription() got some positional-only arguments passed as keyword arguments: 'med3'<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Writing a Function that Accepts Keyword-only Arguments<\/h3>\n\n\n\n<p>You can use a bare asterisk (<code>*<\/code>) in a function definition to make the parameters on the right side keyword-only.<\/p>\n\n\n\n<p>If you want a function that only accepts keyword parameters, simply include a bare asterisk (<code>*<\/code>) at the beginning of the function parameter list.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python mark:2 decode:true \"># Function that takes only keyword arguments\ndef prescription(*, med1, med2, med3):\n    print(\"Prescribed Meds:\")\n    print(f\"Med 1: {med1}\")\n    print(f\"Med 2: {med2}\")\n    print(f\"Med 3: {med3}\")\n\nprescription(med1=\"Paracetamol\", med2=\"Omeprazole\", med3=\"Ibuprofen\")\n\n-------------------\nPrescribed Meds:\nMed 1: Paracetamol\nMed 2: Omeprazole\nMed 3: Ibuprofen<\/pre><\/div>\n\n\n\n<p>The function <code>prescription()<\/code> now only accepts keyword arguments and disallows positional arguments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Valid &amp; Invalid Function Definitions<\/h2>\n\n\n\n<p>Here are some valid function definitions that can go well with slash and asterisk. <a href=\"https:\/\/peps.python.org\/pep-0570\/#specification\" target=\"_blank\" rel=\"noreferrer noopener\">Source<\/a><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">def f(p1, p2, \/, p_or_kw, *, kw):\ndef f(p1, p2=None, \/, p_or_kw=None, *, kw):\ndef f(p1, p2=None, \/, *, kw):\ndef f(p1, p2=None, \/):\ndef f(p1, p2, \/, p_or_kw):\ndef f(p1, p2, \/):<\/pre><\/div>\n\n\n\n<p>You are most likely familiar with the rules for defining positional and keyword parameters, and the function definitions mentioned above are valid in accordance with those rules.<\/p>\n\n\n\n<p>However, the following function definitions are considered invalid because they aren&#8217;t defined as per the rules.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">def f(p1, p2=None, \/, p_or_kw, *, kw):\ndef f(p1=None, p2, \/, p_or_kw=None, *, kw):\ndef f(p1=None, p2, \/):<\/pre><\/div>\n\n\n\n<p>Once the parameter with default value has been defined, all subsequent parameters (optional for parameters after the asterisk) must be defined with the default value to avoid ambiguity in function calls.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The slash (<code>\/<\/code>) and asterisk (<code>*<\/code>) determine how an argument should be passed when you call the function.<\/p>\n\n\n\n<p>A slash (<code>\/<\/code>) in the function definition indicates that the parameters on the left side must be treated as positional only.<\/p>\n\n\n\n<p>A bare asterisk (<code>*<\/code>) in function definition indicates that the parameters on the right side must be treated as keyword-only.<\/p>\n\n\n\n<p>You can use either both of them or a single in the function definition. When you are using both slash and asterisk, the slash must be inserted before the asterisk.<\/p>\n\n\n\n<p>Resource: <a href=\"https:\/\/peps.python.org\/pep-0570\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/peps.python.org\/pep-0570\/<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\ud83c\udfc6<strong>Other articles you might be interested in if you liked this one<\/strong><\/p>\n\n\n\n<p>\u2705<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/geekpython.in\/understanding-if-__name__-__main__-in-python-programs\">Why if __name__ == &#8220;__main__&#8221; is used in Python programs<\/a>?<\/p>\n\n\n\n<p>\u2705<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/geekpython.in\/yield-keyword-in-python\">What is the yield keyword in Python<\/a>?<\/p>\n\n\n\n<p>\u2705<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/geekpython.in\/build-websocket-server-and-client-using-python\">Create a WebSocket server and client in Python<\/a>.<\/p>\n\n\n\n<p>\u2705<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/geekpython.in\/decorators-in-python\">How do decorators in Python work and how to create a custom decorator<\/a>?<\/p>\n\n\n\n<p>\u2705<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/geekpython.in\/python-getitem-method\">What is __getitem__ method in Python class<\/a>?<\/p>\n\n\n\n<p>\u2705<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/geekpython.in\/map-function-in-python\">The map() function in Python for mapping a function to each item in the iterable<\/a>?<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>That&#8217;s all for now<\/strong><\/p>\n\n\n\n<p><strong>Keep Coding\u270c\u270c<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you read the documentation of some functions you see a slash (\/) and an asterisk (*) passed in the function definition. Why are they passed in a function? Why Slash and Asterisk are Used? The slash (\/) and asterisk (*) are used to determine how an argument should pass when a function is called. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1690,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[2,71],"tags":[31],"class_list":["post-1685","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-misc","tag-python3","entry","has-media"],"_links":{"self":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts\/1685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/comments?post=1685"}],"version-history":[{"count":8,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts\/1685\/revisions"}],"predecessor-version":[{"id":1711,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts\/1685\/revisions\/1711"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/media\/1690"}],"wp:attachment":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/media?parent=1685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/categories?post=1685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/tags?post=1685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}