{"id":10691,"date":"2023-08-13T10:35:47","date_gmt":"2023-08-13T08:35:47","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=10691"},"modified":"2023-08-13T10:35:50","modified_gmt":"2023-08-13T08:35:50","slug":"noob-or-just-oldish","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2023\/08\/13\/noob-or-just-oldish\/","title":{"rendered":"Noob or &#8220;just&#8221; oldish?"},"content":{"rendered":"\n<p>Young Jedi <a href=\"https:\/\/medium.com\/@anmol3015?source=post_page-----573d4696c463--------------------------------\">Anmol Tomar<\/a>, your pythoninc knowledge lacks historical viewpoint. <a href=\"https:\/\/peps.python.org\/pep-0202\/\">List Comprehensions were the Python Enhancement Proposals( PEP) 202<\/a>. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>In fact <a href=\"https:\/\/medium.com\/@anmol3015?source=post_page-----573d4696c463--------------------------------\">Anmol Tomar<\/a> wrote on medium.com &#8220;<a href=\"https:\/\/medium.com\/codex\/9-common-python-mistakes-youll-be-able-to-avoid-after-reading-this-blog-573d4696c463\">9 Python Mistakes That Reveal You\u2019re a Nooby! <\/a>Move away from noob status!&#8221;. Too bad he want to be read only by people in medium walled garden. The fist is readable:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h2 class=\"wp-block-heading\">1. Neglecting Pythonic Idioms<\/h2>\n\n\n\n<p>Python has its own set of idioms and best practices that make your code more elegant and readable. A common mistake among newcomers is writing code in a non-Pythonic way.<\/p>\n\n\n\n<p>For example, using excessive loops when list comprehensions or generator expressions could provide a more concise solution. Embrace Pythonic idioms to improve the readability and maintainability of your code.<\/p>\n\n\n\n<p><em>Wrong<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Non-Pythonic way<br \/>squared_numbers = []<br \/>for i in range(1, 6):<br \/>    squared_numbers.append(i ** 2)<\/pre>\n\n\n\n<p>In this example, using a list comprehension provides a more concise and readable solution compared to the traditional loop and append approach.<\/p>\n\n\n\n<p><em>Correct<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Pythonic way<br \/>squared_numbers = [i ** 2 for i in range(1, 6)]<\/pre>\n<\/blockquote>\n\n\n\n<p>Young Jedi, your pythoninc knowledge lacks historical viewpoint.  The &#8220;non python way&#8221; was the <strong>only<\/strong> pythonic way back in the 1.5.x days.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Young Jedi Anmol Tomar, your pythoninc knowledge lacks historical viewpoint. List Comprehensions were the Python Enhancement Proposals( PEP) 202.<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2023\/08\/13\/noob-or-just-oldish\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[113],"tags":[],"class_list":["post-10691","post","type-post","status-publish","format-standard","hentry","category-python"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2Mr","jetpack-related-posts":[{"id":14807,"url":"https:\/\/monodes.com\/predaelli\/2026\/01\/23\/the-xonsh-shell-python-powered-shell\/","url_meta":{"origin":10691,"position":0},"title":"The Xonsh Shell \u2014 Python-powered shell","author":"Paolo Redaelli","date":"2026-01-23","format":false,"excerpt":"The Xonsh Shell \u2014 Python-powered shell. Python shell. Python in the shell. Shell in Python. Shell and Python. Python and shell.Xonsh (sounds like \"consh\") is a modern, full-featured and cross-platform python shell. The language is a superset of Python 3.6+ with additional shell primitives that you are used to from\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2026\/01\/xonsh.webp?fit=257%2C399&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3299,"url":"https:\/\/monodes.com\/predaelli\/2017\/08\/25\/micropython-python-for-microcontrollers\/","url_meta":{"origin":10691,"position":1},"title":"MicroPython &#8211; Python for microcontrollers","author":"Paolo Redaelli","date":"2017-08-25","format":false,"excerpt":"MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments. Sorgente: MicroPython - Python for microcontrollers Well, pretty neat, as they deliver it in 256k of\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12976,"url":"https:\/\/monodes.com\/predaelli\/2025\/03\/15\/codon-high-performance-python-compiler\/","url_meta":{"origin":10691,"position":2},"title":"Codon: high-performance Python compiler","author":"Paolo Redaelli","date":"2025-03-15","format":false,"excerpt":"Codon: high-performance Python compiler Codon is a high-performance Python implementation that compiles to native machine code without any runtime overhead. Typical speedups over vanilla Python are on the order of 10-100x or more, on a single thread. Codon's performance is typically on par with (and sometimes better than) that of\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11883,"url":"https:\/\/monodes.com\/predaelli\/2024\/08\/28\/python-shared-memory-in-multiprocessing\/","url_meta":{"origin":10691,"position":3},"title":"Python Shared Memory in Multiprocessing","author":"Paolo Redaelli","date":"2024-08-28","format":false,"excerpt":"Python Shared Memory in Multiprocessing np_array's size=220.0MB With SharedMemory: ... Current memory usage 0.11283MB; Peak: 0.156706MB Time elapsed: 0.99s No SharedMemory: ... Current memory usage 0.026587MB; Peak: 467.558995MB Time elapsed: 5.48s I think I shall go for shared memory! My Amiga formation years requires it! Python Shared Memory in Multiprocessing\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8194,"url":"https:\/\/monodes.com\/predaelli\/2021\/02\/24\/python-packages-and-one-liners\/","url_meta":{"origin":10691,"position":4},"title":"Python Packages and one-liners","author":"Paolo Redaelli","date":"2021-02-24","format":false,"excerpt":"That Makes You Life Easier 20 Python Packages That You Must Try | by Abhay Parashar | Level Up Coding 25 Useful Python One-Liners That You Should know","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2129,"url":"https:\/\/monodes.com\/predaelli\/2017\/02\/01\/thonny-python-ide-for-beginners\/","url_meta":{"origin":10691,"position":5},"title":"Thonny, Python IDE for beginners","author":"Paolo Redaelli","date":"2017-02-01","format":"link","excerpt":"\u00a0Thonny, Python IDE for beginners","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/10691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=10691"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/10691\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=10691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=10691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=10691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}