python notes
@pythonnotes
python tips for myself
Bunları beğenebilirsin
f-string is becoming a dominant way to format strings in Python thanks to its powerful and concise syntax. But do you know backslashes may not appear inside the curly braces {}. Here is an sample and explanation.
A key difference between three class builders of #Python “data class” is that collections.namedtuple and typing.NamedTuple build tuple subclasses, therefore the instances are immutable. By default, @ dataclass produces mutable classes.
Python uses data buffer to temporarily store data before it is sent to output device.
Concurrency provides a way to structure a solution to solve a problem that can be (not necessarily) be parallelizable. Parallelism is just a special case of concurrency. #Python
Everything in #Python is an object, including functions and class definitions and basic values like integers, floats, Booleans, and strings.
When a #Python function is defined, the Python bytecode compiler determines how to fetch a variable that appears in it based on some variable lookup logic.
To specify keyword-only arguments when defining a function, name them after the argument prefixed with *. If you don’t want to support variable positional arguments but still want keyword-only arguments, put a * by itself in the signature. #Python #pythonprogramming
In #Python, first-class functions can be helpful for programming in a functional style, of which one hallmark is using higher-order functions, such as `map`, `filter`, `reduce`. But, in same cases, list comprehensions or generator expressions can be better choices.
Liskov Substitution Principle (LSP) is defined 'subtype-of' in terms of supported operations, which is called behavioral subtyping.
Duck typing is popular in Python, JavaScript, and Ruby, only enforced at runtime, and more flexible than nominal typing that adopted by C++, Java, and C#.
United States Trendler
- 1. Vikings 32.5K posts
- 2. Wentz 9,402 posts
- 3. Chargers 41.7K posts
- 4. Herbert 12K posts
- 5. #Skol 3,876 posts
- 6. #911onABC 12.4K posts
- 7. Brosmer 1,510 posts
- 8. #TNFonPrime 1,793 posts
- 9. Ladd 3,914 posts
- 10. Oronde Gadsden 3,319 posts
- 11. #Blackhawks 1,450 posts
- 12. $UNI 2,244 posts
- 13. #BoltUp 2,515 posts
- 14. Dallas Turner N/A
- 15. Pacers 13.5K posts
- 16. Taylor Raddysh N/A
- 17. Quentin Johnston N/A
- 18. Rempe 3,899 posts
- 19. Al Michaels N/A
- 20. Justin Jefferson 2,581 posts
Bunları beğenebilirsin
-
CSI @ サイバーセキュリティ系YouTuber
@csi_capy -
いしたか@印刷営業DX支援
@stlab7 -
Hiromi Matsumae
@hmat_evo -
Ed Nuttall
@TeamNutz -
Shobhana Viswanathan
@shobhanav -
リップ(りっぷおう) / アンノウン・サウンド
@Lip_Unknown -
Neel Shah
@codedailyML -
Vaibhav Raj Singh
@vrs2001 -
てるのすけ
@teruter19894085 -
Namta Gupta
@Namta_G -
志麻帆
@shima_teine -
らいじんさまのごかご
@gokago0127
Something went wrong.
Something went wrong.