PythonChat's profile picture. Live webcasts for #Python developers.

Tweets by @treyhunner.

Python Chat

@PythonChat

Live webcasts for #Python developers. Tweets by @treyhunner.

Python Chat รีโพสต์แล้ว

Does your company have an individual training budget that expires at the end of year? 💸 If you use #Python at work, sign up for the @PythonMorsels All Access plan and submit your training reimbursement before year end. 🐍💼 pythonmorsels.com/all-python-exe…

pythonmorsels.com

Python skill-building for professional developers

Practice a new intermediate-level Python concept every week


Python Chat รีโพสต์แล้ว

Managing a #Python team and want to chat about your team's skill trajectory? I have ideas & opinions! I'd love to chat about: 1. On-boarding new hires 📋 2. Fostering kind code style discussions 🐕 3. Learning from each other regularly 👩‍🏫 4. Team learning in general 🤔 DM me 💬


Python Chat รีโพสต์แล้ว

New blog post: What's great about #Python 3.10? There's some fun new features, but improved error messages are *the* winning Python 3.10 feature. treyhunner.com/2021/10/whats-…


Python Chat รีโพสต์แล้ว

When we use keyword/named arguments, it's the name that matters, not the position Read the full article: Keyword (Named) Arguments in Python: How to Use Them ▸ trey.io/U92hu3 #Python


Python Chat รีโพสต์แล้ว

If you're new to list comprehensions in #Python, I recommend writing your comprehensions by copy-pasting your way from a "for" loop. This way you can anchor your understanding of comprehensions on your existing knowledge of "for" loops. pythonmorsels.com/topics/turning…

pythonmorsels.com

Turning a for loop into a list comprehension

If you're new to comprehensions, I recommend copy-pasting your way from a loop to comprehension to anchor your existing understanding of for loops with your new knowledge of comprehensions.


Python Chat รีโพสต์แล้ว

What is a list comprehension in #Python? What are they used for and how are they different from a for loop? pythonmorsels.com/topics/what-ar…


Python Chat รีโพสต์แล้ว

Something folks often ask me in my Python trainings: are immutable objects the same as constants? 🤔 They're not! 😮 Immutable objects stop you from mutating an object but constants stop you from assigning to a variable (remember: variables are pointers in Python). 🐍🍪


Python Chat รีโพสต์แล้ว

Checking an object's truthiness checks for non-emptiness and non-zero-ness. FYI: the #Python docs don't mention "truthy" or "falsey" even once. The docs call it "truth value testing" but Pythonistas rarely use that phrase colloquially. pythonmorsels.com/topics/truthin…

pythonmorsels.com

Truthiness

In Python, truthiness is asking the question, what happens if I convert an object to a boolean. Every Python object is truthy by default. Truthiness in Python is about non-emptiness and non-zeroness.


Python Chat รีโพสต์แล้ว

Let's look at different techniques for counting the number of times things appear in a list. Read more 👉 trey.io/wV2O5R #python


Python Chat รีโพสต์แล้ว

Parentheses in #Python's class & function definitions mean different things In a function definition, parentheses after the name denote the functions' arguments. In a class definition, parentheses after the name denote the class' parent classes. pythonmorsels.com/topics/inherit…


Python Chat รีโพสต์แล้ว

The first method you'll see in most #Python classes is the init method. This isn't a constructor method but an initializer method (because by the time init is called, a new class instance has already been "constructed") pythonmorsels.com/topics/what-is…

pythonmorsels.com

What is __init__ in Python?

The __init__ method is used to initialize a class. The initializer method accepts self (the class instance) along with any arguments the class accepts and then performs initialization steps.


Loading...

Something went wrong.


Something went wrong.