Bob Belderbos
@bbelderbos
Followers
10K
Following
14K
Media
1K
Statuses
16K
Software developer passionate about building useful tools and helping people grow their #Python and #programming skills through @Pybites
Spain
Joined August 2010
Python Scope - What Is NameError and UnboundLocalError? - How #Python Finds Names
1
1
2
🚀 Takeaway: • FIFO (first in → first out) = 'queue' = use a collections.deque() for fast popleft() • LIFO (last in → first out) = 'stack' = a list works fine since append() / pop() on the right are fast
0
0
1
Magnesiacore. Indoor Pool Drywall and Ceilings is a True Marine Wallboard. When it comes to indoor pools, natatoriums, or other enclosed spaces with high humidity and the moist chemical exposure it entails, you need a construction board that can withstand these elements.
1
2
24
Using the right data structure matters💡 > "Popping from the left on a deque is an O(1) operation, whereas it is an O(n) operation on a list. In the case of the list, after popping from the left, every subsequent element must be moved one to the left, making it inefficient"
1
1
5
Itertools, the gift that keeps giving! 😍 Since #Python 🐍 3.12 you don't have to write your chunking helper anymore, just use `batched` - see docs:
2
4
30
Here it's just one constant, if you have multiple related ones, use enums
1
0
0
Achieve your trading dreams today! With Tradeify, you can access up to $150K in funding, allowing you to trade futures without the risk of using your own money. Get 30% OFF all accounts With code: OCT
2
11
41
Coding tip: avoid magic numbers, use constants instead. You not only de-duplicate your code (make it more DRY), your code will also be more readable:
2
1
10
Exciting new @pybites podcast episode with Christina Lang to talk about her journey as developer + practical mindset tips ->
0
1
3
Transform Your Developer Mindset in Our PDM Program https://t.co/qzrelTjkrj via @YouTube
0
1
2
I went on Pybites last week to talk about ty, our Python type checker and language server https://t.co/Cmo2Mev6nc
7
12
127
BREAKING: Elvis has officially won the Daytona 500 AI is becoming more real every day...
15
29
281
New social buttons added - please share when you finish Bites on our platform, we'd love to see your progress! 🐍 😍 📈
0
1
1
I've just completed "Write a property" on @pybites 🎉 - https://t.co/KG8UChooBR - properties are so Pythonic and nice 🐍 😍 📈
pybitesplatform.com
Overwhelmed by tutorials? Stop consuming books and courses! Confidence will come through a lot of deliberate practice. Our platform helps you master Python and grasp Pythonic best practices.
0
1
2
Did you know that by adding `__enter__` and `__exit__` to a class, you can turn it into a context manager? 🐍 💡 Here’s an example where a transaction automatically rolls back if the balance goes negative—ensuring safer operations. 🚀 🔹 Entering the context saves the current
2
1
8