Add range-len tag#1035
Conversation
|
Thank you for contributing to Python Discord! Please check out the following documents:
|
Removed all blank lines to improve how it's rendered on Discord; thanks @kwzrd for rendering this!
kwzrd
left a comment
There was a problem hiding this comment.
Here's what the tag ends up looking like in Discord:
I think this is well written and I'm happy to approve it.
Some tags that we have will show an interactive session to demonstrate what the output looks like, for example:
This gives a more tangible example of the discussed practices, but it comes at the cost of making the embed (perhaps needlessly) bigger. I don't mind either way, I'm happy with the current approach, just wanted to mention this in case you end up preferring it.
Either way, good job!
|
@kwzrd I see what you're saying about displaying the REPL output. I think people who use |
|
Looks good! However, since we do have |
|
@Den4200 Do we have any other messages that suggest that you run a command to get another message? The idea sounds a bit weird to me, but our messages would probably be more informative for our intended audience than the Python docs. |
Den4200
left a comment
There was a problem hiding this comment.
Hmm, I don't think there are any tags that mention other ones. It's just the docs from what I can tell, so I'll leave it up to you to decide.
|
After some discussion in |


This would be a message we could whip out when we see
range(len(...))for loops during help sessions. I intentionally left out a lot of interesting details to keep the message concise.I recall there being a RealPython article about "pythonic loops" and was hoping to link to it, but it looks like it's now paid content. I saw that our guides are under construction and I'd be happy to write a guide on loops with an emphasis on pythonicness.
I don't know that linking to the official Python docs is a digestible resource for some learners, especially those who don't have experience in other languages, so I'm very much open to alternatives for those.