{"id":254239,"date":"2024-04-08T16:07:28","date_gmt":"2024-04-08T16:07:28","guid":{"rendered":"https:\/\/namso-gen.co\/blog\/?p=254239"},"modified":"2024-04-08T16:07:28","modified_gmt":"2024-04-08T16:07:28","slug":"what-is-the-value-of-__name__-when-multiple-modules-are-loaded","status":"publish","type":"post","link":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/","title":{"rendered":"What is the value of __name__ when multiple modules are loaded?"},"content":{"rendered":"<p>When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if it is being imported as a module. This variable allows the programmer to determine the context in which the code is being run, providing flexibility in module usage.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_62 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#What_is_the_value_of_name_when_multiple_modules_are_loaded\" title=\"What is the value of __name__ when multiple modules are loaded?\">What is the value of __name__ when multiple modules are loaded?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#How_does_name_work\" title=\"How does __name__ work?\">How does __name__ work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#What_is_the_purpose_of_name\" title=\"What is the purpose of __name__?\">What is the purpose of __name__?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#How_is_name_used_to_distinguish_between_the_main_program_and_a_module\" title=\"How is __name__ used to distinguish between the main program and a module?\">How is __name__ used to distinguish between the main program and a module?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#What_is_the_value_of_name_when_a_module_is_imported\" title=\"What is the value of __name__ when a module is imported?\">What is the value of __name__ when a module is imported?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#How_can_the_value_of_name_be_utilized\" title=\"How can the value of __name__ be utilized?\">How can the value of __name__ be utilized?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#Can_the_value_of_name_be_changed\" title=\"Can the value of __name__ be changed?\">Can the value of __name__ be changed?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#What_is_the_significance_of_%E2%80%9C_main_%E2%80%9D_when_using_name\" title=\"What is the significance of &#8220;__main__&#8221; when using __name__?\">What is the significance of &#8220;__main__&#8221; when using __name__?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#How_does_name_help_in_code_organization\" title=\"How does __name__ help in code organization?\">How does __name__ help in code organization?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#Can_multiple_modules_have_the_same_value_of_name\" title=\"Can multiple modules have the same value of __name__?\">Can multiple modules have the same value of __name__?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#Does_name_have_any_other_applications\" title=\"Does __name__ have any other applications?\">Does __name__ have any other applications?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#Can_the_value_of_name_be_used_for_debugging_purposes\" title=\"Can the value of __name__ be used for debugging purposes?\">Can the value of __name__ be used for debugging purposes?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#How_does_the_value_of_name_affect_the_behavior_of_the_code\" title=\"How does the value of __name__ affect the behavior of the code?\">How does the value of __name__ affect the behavior of the code?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_the_value_of_name_when_multiple_modules_are_loaded\"><\/span><strong>What is the value of __name__ when multiple modules are loaded?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The value of __name__ when multiple modules are loaded is different for each module depending on its execution context.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_does_name_work\"><\/span>How does __name__ work?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\n__name__ is a built-in variable in Python that holds the name of the current module. When a module is executed as the main program, its __name__ value becomes &#8220;__main__&#8221;. If the module is imported as a module, its __name__ value is set to the actual module name.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_purpose_of_name\"><\/span>What is the purpose of __name__?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nThe purpose of __name__ is to allow a module to know whether it is being executed as the main program or if it is being imported as a module. This allows the code to behave differently depending on the context, offering more flexibility and reusability.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_is_name_used_to_distinguish_between_the_main_program_and_a_module\"><\/span>How is __name__ used to distinguish between the main program and a module?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nBy checking the value of __name__, a module can determine if it is being executed as the main program or if it is being imported. This distinction allows for specific actions to be taken based on the desired use case.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_value_of_name_when_a_module_is_imported\"><\/span>What is the value of __name__ when a module is imported?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nWhen a module is imported, the value of __name__ becomes the actual name of the module instead of &#8220;__main__&#8221;. This allows the code to identify itself as an imported module rather than the main program.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_can_the_value_of_name_be_utilized\"><\/span>How can the value of __name__ be utilized?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nThe value of __name__ can be utilized to include or exclude certain blocks of code depending on whether the module is being run as the main program or imported as a module. This helps in developing modular and reusable code.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_the_value_of_name_be_changed\"><\/span>Can the value of __name__ be changed?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nThe value of __name__ cannot be changed directly. It is automatically assigned either &#8220;__main__&#8221; when a module is executed as the main program or the name of the module when it is imported.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_significance_of_%E2%80%9C_main_%E2%80%9D_when_using_name\"><\/span>What is the significance of &#8220;__main__&#8221; when using __name__?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nThe term &#8220;__main__&#8221; is important for determining the main entry point of a Python program. When a module&#8217;s __name__ value is &#8220;__main__&#8221;, it means that module is the main program being executed.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_does_name_help_in_code_organization\"><\/span>How does __name__ help in code organization?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nBy utilizing the value of __name__, Python programmers can organize their code in modules that can be easily imported into other programs. This promotes code reusability and modularity.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_multiple_modules_have_the_same_value_of_name\"><\/span>Can multiple modules have the same value of __name__?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nNo, each module will have its unique value of __name__. When a module is imported as a module, its __name__ value will be the actual module name.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_name_have_any_other_applications\"><\/span>Does __name__ have any other applications?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, other than distinguishing between a main program and an imported module, __name__ can also be used to determine if the module is being run directly or being imported indirectly by another module.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_the_value_of_name_be_used_for_debugging_purposes\"><\/span>Can the value of __name__ be used for debugging purposes?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, the value of __name__ can be used for debugging. By printing the value of __name__, programmers can diagnose whether a module is being executed as the main program or imported.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_does_the_value_of_name_affect_the_behavior_of_the_code\"><\/span>How does the value of __name__ affect the behavior of the code?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nThe value of __name__ affects the behavior of the code by allowing certain sections of code to be executed only when the module is run directly, while skipping those sections when the module is imported. This provides greater control and flexibility in program execution.<\/p>\n<p>In conclusion, the value of __name__ plays a crucial role in determining the context in which a module is executed. By utilizing this variable, programmers can create more modular and reusable code, as well as design specific behaviors based on whether the module is being executed as the main program or imported.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if it is being imported as a module. This variable allows the programmer to determine the context in which the code is being run, providing flexibility in module usage. &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"What is the value of __name__ when multiple modules are loaded?\" class=\"read-more button\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#more-254239\">Read more<span class=\"screen-reader-text\">What is the value of __name__ when multiple modules are loaded?<\/span><\/a><\/p>\n","protected":false},"author":64,"featured_media":107420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86279],"tags":[],"class_list":["post-254239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is the value of __name__ when multiple modules are loaded?<\/title>\n<meta name=\"description\" content=\"When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the value of __name__ when multiple modules are loaded?\" \/>\n<meta property=\"og:description\" content=\"When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if\" \/>\n<meta property=\"og:url\" content=\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\" \/>\n<meta property=\"og:site_name\" content=\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/synchronyfinancial\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-08T16:07:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Cheri Schmidt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@synchrony\" \/>\n<meta name=\"twitter:site\" content=\"@synchrony\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cheri Schmidt\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\"},\"author\":{\"name\":\"Cheri Schmidt\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/c76e2cbb558032cc4e544dc3103d3a04\"},\"headline\":\"What is the value of __name__ when multiple modules are loaded?\",\"datePublished\":\"2024-04-08T16:07:28+00:00\",\"dateModified\":\"2024-04-08T16:07:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\"},\"wordCount\":685,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"articleSection\":[\"Learn\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\",\"name\":\"What is the value of __name__ when multiple modules are loaded?\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\"},\"datePublished\":\"2024-04-08T16:07:28+00:00\",\"dateModified\":\"2024-04-08T16:07:28+00:00\",\"description\":\"When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if\",\"breadcrumb\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/namso-gen.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is the value of __name__ when multiple modules are loaded?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"description\":\"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co\",\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/namso-gen.co\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"contentUrl\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"width\":500,\"height\":164,\"caption\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\"},\"image\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/synchronyfinancial\",\"https:\/\/twitter.com\/synchrony\",\"https:\/\/www.youtube.com\/synchronyfinancial\",\"https:\/\/www.instagram.com\/synchrony\",\"https:\/\/www.linkedin.com\/company\/synchrony-financial\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/c76e2cbb558032cc4e544dc3103d3a04\",\"name\":\"Cheri Schmidt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Cheri Schmidt\"},\"description\":\"Guest author Cheri Schmidt has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the value of __name__ when multiple modules are loaded?","description":"When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/","og_locale":"en_US","og_type":"article","og_title":"What is the value of __name__ when multiple modules are loaded?","og_description":"When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if","og_url":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/","og_site_name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","article_publisher":"https:\/\/www.facebook.com\/synchronyfinancial","article_published_time":"2024-04-08T16:07:28+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png","type":"image\/png"}],"author":"Cheri Schmidt","twitter_card":"summary_large_image","twitter_creator":"@synchrony","twitter_site":"@synchrony","twitter_misc":{"Written by":"Cheri Schmidt","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#article","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/"},"author":{"name":"Cheri Schmidt","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/c76e2cbb558032cc4e544dc3103d3a04"},"headline":"What is the value of __name__ when multiple modules are loaded?","datePublished":"2024-04-08T16:07:28+00:00","dateModified":"2024-04-08T16:07:28+00:00","mainEntityOfPage":{"@id":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/"},"wordCount":685,"commentCount":0,"publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"articleSection":["Learn"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/","url":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/","name":"What is the value of __name__ when multiple modules are loaded?","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/#website"},"datePublished":"2024-04-08T16:07:28+00:00","dateModified":"2024-04-08T16:07:28+00:00","description":"When multiple modules are loaded in Python, the value of the __name__ variable depends on whether the module is being executed as the main program or if","breadcrumb":{"@id":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/namso-gen.co\/blog\/what-is-the-value-of-__name__-when-multiple-modules-are-loaded\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/namso-gen.co\/blog\/"},{"@type":"ListItem","position":2,"name":"What is the value of __name__ when multiple modules are loaded?"}]},{"@type":"WebSite","@id":"https:\/\/namso-gen.co\/blog\/#website","url":"https:\/\/namso-gen.co\/blog\/","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","description":"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co","publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/namso-gen.co\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/namso-gen.co\/blog\/#organization","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","url":"https:\/\/namso-gen.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","contentUrl":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","width":500,"height":164,"caption":"Namso Gen Blog - Free Credit Card Generator [100% Valid]"},"image":{"@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/synchronyfinancial","https:\/\/twitter.com\/synchrony","https:\/\/www.youtube.com\/synchronyfinancial","https:\/\/www.instagram.com\/synchrony","https:\/\/www.linkedin.com\/company\/synchrony-financial"]},{"@type":"Person","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/c76e2cbb558032cc4e544dc3103d3a04","name":"Cheri Schmidt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Cheri Schmidt"},"description":"Guest author Cheri Schmidt has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here."}]}},"_links":{"self":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/254239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/comments?post=254239"}],"version-history":[{"count":0,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/254239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media\/107420"}],"wp:attachment":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media?parent=254239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/categories?post=254239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/tags?post=254239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}