Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

Rodrigo 🐍🚀

@mathsppblog@fosstodon.org
mastodon 4.7.3
  • Open on fosstodon.org

Helping you take your Python 🐍 skills to the next level! 🚀

247 Followers
71 Following
9 Posts
Joined May 17, 2024
Write better Python 🐍🚀::
https://mathspp.com/pydonts
Read a Python deep dive every Monday 🐍🚀:
https://mathspp.com/insider
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 6mo ago

Too many arrows?

#Python

fosstodon.org

Fosstodon

2
0
2
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 7mo ago

#Python decorators blueprint: a step by step explanation of the full decorator anatomy.

Steal this for when you're writing your own decorators.

fosstodon.org

Fosstodon

2
0
2
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 6mo ago

What's your favourite vanilla #Python feature?

(Abuses of the Python syntax are valid answers.)

fosstodon.org

Fosstodon

1
0
1
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 7mo ago

RE: @mathsppblog@fosstodon.org

I know I only ask random nonsensical questions.

Came up with 4 random ways to do this.

2, I recommend you use them (although 1 doesn't work!)

The other 2 are really cool — they use fixed points and `itertools.groupby` — but they'll be overkill 99.9% of times.

fosstodon.org

Rodrigo 🐍🚀: "How do you collapse runs of adjacent spaces in #P…" - Fosstodon

0
0
0
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 7mo ago

How do you collapse runs of adjacent spaces in #Python ?

That is, shorter runs of 2+ consecutive spaces so there's only 1 space there?

I can't come up with a simple/straightforward way to do it with `str.join` and I'm surprised...

What am I missing?

fosstodon.org

Fosstodon

0
9
0
1
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 7mo ago

RE: @mathsppblog@fosstodon.org

Let the record show that, while I managed to start a number of interesting but useless discussions, I WAS able to prove the “someone else” wrong.

So, thank you, everyone!

fosstodon.org

Rodrigo 🐍🚀: "How do you read `*args` out loud in the context o…" - Fosstodon

0
0
0
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 7mo ago
Replying to
@yngvem @bmispelon yeah, exactly! Using .split(" ") is closer, but then you also need to filter the empty strings, so something like " ".join(filter(None, string.split(" "))) is close... But then, what if you had leading/trailing space? Then, it disappears! 😭
0
1
0
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 7mo ago
Replying to
@cazabon That gets rid of newlines and I didn't want that. I only want to collapse spaces.
0
1
0
0
Open post
Rodrigo 🐍🚀 @mathsppblog@fosstodon.org
· 5mo ago

I'm trying to reach out to @charliermarsh@hachyderm.io because of the upcoming EuroPython conference.

Do I know anyone here who can help me get to him?

Thanks 🙏

hachyderm.io

Charlie Marsh (@charliermarsh@hachyderm.io) - Hachyderm.io

0
0
1
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 22:57:54 UTC