Pybites (@pybites) 's Twitter Profile
Pybites

@pybites

Helping people worldwide to improve their #Python + #developer + #mindset skills.
Created by @bbelderbos & @juliansequeira.
Join us: pybit.es/community/

ID: 812103603116613632

linkhttps://pybitesplatform.com calendar_today23-12-2016 01:12:41

11,11K Tweet

30,30K Followers

242 Following

Charlie Marsh (@charliermarsh) 's Twitter Profile Photo

The ty diagnostics are getting so good. If you reference a symbol or module that was defined in a more recent Python version, we tell you that, and also tell you where/why we inferred the supported Python version.

The ty diagnostics are getting so good.

If you reference a symbol or module that was defined in a more recent Python version, we tell you that, and also tell you where/why we inferred the supported Python version.
Bob Belderbos (@bbelderbos) 's Twitter Profile Photo

The other day I wanted to group countries by continent. I used: ✅ Use pycountry-convert for mapping. ✅ Use defaultdict(list) to skip key checks. ✅ pprint or pp() for a clean output. (By the way, what is new in my imports? 🐍💡)

The other day I wanted to group countries by continent. 

I used:

✅ Use pycountry-convert for mapping.

✅ Use defaultdict(list) to skip key checks.

✅ pprint or pp() for a clean output. 

(By the way, what is new in my imports? 🐍💡)
Bob Belderbos (@bbelderbos) 's Twitter Profile Photo

🚀 Want faster & leaner #Python objects? Use __slots__: ``` class Point: __slots__ = ('x', 'y') ``` ✅ Saves memory (no __dict__) ✅ Prevents new attrs (p.z = 3 → 💥) Great for tight loops & cleaner models.

🚀 Want faster & leaner #Python objects?

Use __slots__:

```
class Point:
    __slots__ = ('x', 'y')
```

✅ Saves memory (no __dict__)
✅ Prevents new attrs (p.z = 3 → 💥)

Great for tight loops & cleaner models.
Bob Belderbos (@bbelderbos) 's Twitter Profile Photo

Like Unix piping, you can build function pipelines in #Python by overriding the `__or__` method. This lets you chain operations where each function’s output feeds into the next -> clean, readable, and composable. Simple example below 👇

Like Unix piping, you can build function pipelines in #Python by overriding the `__or__` method.

This lets you chain operations where each function’s output feeds into the next -> clean, readable, and composable.

Simple example below 👇
Charlie Marsh (@charliermarsh) 's Twitter Profile Photo

LLMs are a tool just like anything else. You have to learn to use them, and you get better with time and practice. If you tried ChatGPT once, got a bad answer, and churned off the entire technology, it may have just been a skill issue (respectfully).

Bob Belderbos (@bbelderbos) 's Twitter Profile Photo

I just migrated one of my last projects to #uv so I thought it would be useful to share the steps here - see image below. 💡📈 Are you also using uv for all your #Python projects now? 🤔

I just migrated one of my last projects to #uv so I thought it would be useful to share the steps here - see image below. 💡📈

Are you also using uv for all your #Python projects now? 🤔
Pybites (@pybites) 's Twitter Profile Photo

New video on our channel: Learn #Github Actions - Building an Automated Video Summary Pipeline youtu.be/pcPE0PFdUK0?si… via YouTube