
🐸 Le Pythonista Grenouille
@grenouille_py
Un jeune Français passionné par Python
你可能會喜歡
Qu'est ce qu'on dit déjà ? Ah oui : "ne réinventez pas la roue!" C'est aussi valable quand vous ne faites pas de code ;)
Bon, évitez quand même de prendre l'avion, même si vous n'envoyez pas de pièces jointes hein Comme disait Einstein : "Le train, c'est bien aussi"
Je suis du côté de l’écologie des solutions, pas de l’écologie des illusions. La transition énergétique et écologique est le défi de notre siècle. Ma mission, c’est qu’elle se transforme en actes concrets. @BFMTV @RMCInfo @AmandineAtalaya
Python 3.11 also introduces the "Self" type. Great for class methods that return an instance of cls. (e.g. factory methods). They're also great for having type-valid inheritance. super_me is an AdminPerson, even though the class method is described in the base class.

👇👇👇
My #Python students also tend to obsess over performance. There's always a chance that your code takes 4 days to run instead of 4 minutes, but you can usually optimize for performance later (if/when it matters). Your time is usually much more expensive than your CPU's time.
A ton avis, après ces 3 lignes, quelles valeurs ont "a" et "numbers" ? Pose toi vraiment la question, car... Sais-tu vraiment comment fonctionne l'assignation multiple en #Python ?

super(MyClass, self).__init__()
Je suis le seul à trouver ça cringe ?
Thank you @Huawei for becoming a Sustainability sponsor! Your support allows the PSF to host PyCon US, advance the Python language, and provide crucial programming for our Python community.

On en apprend tous les jours ! #Python
Generator-related #pythonoddity that bit me recently 🐍🤔 >>> a = (n**2 for n in range(50)) >>> def gen(i): yield from i ... >>> b = gen(a) >>> next(b) 0 >>> b = gen(a) >>> next(b) Traceback (most recent call last): File "<stdin>", line 1, in <module> StopIteration #Python
Simple is better than complex. 🐍🦾🦾🦾
Stack Overflow's 2021 Developer Survey is out. • Programming language that most people want to learn? Python. • Framework that most people want to learn? TensorFlow. The future is evident.
#Python tip: Don't unnecessarily prefix function names with "get". In the sys module, getsizeof() should have been named sizeof(). The "get" is useless baggage.
En #Python, str.split() peut sembler faire des merveilles, mais attention : Beaucoup disent que la valeur par défaut du séparateur est " ", un espace. Or, c'est faux ! La valeur par défaut est None, et elle induit un comportement particulier : Détails: docs.python.org/3/library/stdt…

En #Python 🐍, vous connaissez peut être les defaultdicts. Mais attention ⚠️! Une bonne pratique pour éviter les déconvenues, transformez les en dictionnaires normal, car certaines fonctions utilisent l'exception KeyError pour savoir si une clé existe dans le dictionnaire ! 💡
#Python Travailler avec des path en string est laborieux et fatiguant ? 💡Peut être que vous devriez en apprendre plus sur pathlib.Path ! docs.python.org/fr/3/library/p…


A new #Python developer tried to create a set of 10 random ints, from 0-100: s = {random.randint(0, 100) for i in range(10)} He asked: Why didn't s always have 10 elements? Sets cannot contain duplicates. If the same number is chosen twice, the set will contain it once.
En #Python, Comment créer une liste ? [] Un dictionnaire ? {} Mais un set ? set() Structure de donnée très pratique et pourtant, pas très connue ! docs.python.org/fr/3/tutorial/…
United States 趨勢
- 1. #JoyForum N/A
- 2. #2025MAMAVOTE 114K posts
- 3. Good Thursday 16.8K posts
- 4. #MC필릭스의_냉터뷰 9,804 posts
- 5. MC FELIX FRIDGE INTERVIEW 10.6K posts
- 6. #FridgeInterview_MCFelix 9,929 posts
- 7. Deport Harry Sisson 11.1K posts
- 8. Mila 17.9K posts
- 9. Brevis ZK 137K posts
- 10. Ninja Gaiden 9,084 posts
- 11. DuPont 2,019 posts
- 12. Deloitte 8,347 posts
- 13. #PokemonZA 2,405 posts
- 14. BNB Chain 21.5K posts
- 15. Pelosi 143K posts
- 16. Angel Reese 55.5K posts
- 17. Gabe Vincent 4,381 posts
- 18. Domain For Sale 19.5K posts
- 19. tzuyu 266K posts
- 20. Big Mac 8,262 posts
Something went wrong.
Something went wrong.