[Python-ideas] Re: Simple feature for argparse.py

2019-10-09 Thread brent bejot
7;y'], force=True) > $ > This is EXACTLY what I've been looking for. Looks like it was added in 2017 and release in 3.7. The box I use where I investigated this has 3.6 on it. Sigh, well at least I know it was a good idea! Thanks so much! > > > > On Wed, Oct 9, 2

[Python-ideas] Simple feature for argparse.py

2019-10-09 Thread brent bejot
Hello all, Aspiring contributor here. I am not at all certain that this is the right place to discuss this. Do refer me to a better location if I'm out of place. I would like to add a simple feature to the argparse library. I frequently find myself writing small utilities, stylistically simila

Re: [Python-ideas] a sorting protocol dunder method?

2017-12-04 Thread brent bejot
I'm +1 on this idea for the most part. I agree particularly with the idea that it is better OOP for an object to access it's member variables to create the key than an external container to do so. > and then sort like this: > sorted(list_of_attrdicts, key=AttrDict._id_order) This is certainly a

Re: [Python-ideas] Provide a way to import module without exec body

2017-12-01 Thread brent bejot
I have found myself implementing something like this before. I was working on a command-line tool with nested sub-commands. Each sub-command would import a script and execute something out of it. I ended up moving the importing of those little scripts into the functions that called them because

Re: [Python-ideas] Should Python have user-defined constants?

2017-11-21 Thread brent bejot
Are there any 3rd party tools that already implement this? By my understanding, type annotations started as 3rd party tools that became popular and so are now incorporated into the language proper. I could see a 'const' syntax making its way into the language that way, but not directly. Certainl

Re: [Python-ideas] Rewriting the "roundrobin" recipe in the itertools documentation

2017-11-16 Thread brent bejot
I think the idea behind the original recipe is that when one of the inner lists has been iterated through, it is removed and never looked at again. Imagine the following scenario: L is a list which contains one million empty lists and also a list containing one million numbers Then the original r

Re: [Python-ideas] Moving typing out of the stdlib in Python 3.7?

2017-11-06 Thread brent bejot
On Mon, Nov 6, 2017 at 9:21 AM, Gyro Funch wrote: > On 11/4/2017 2:22 PM, Guido van Rossum wrote: > > On Sat, Nov 4, 2017 at 7:05 AM, Nick Coghlan > > > > wrote: > > > > Perhaps typing could switch to being a bundled module, such that it > > had its own version

[Python-ideas] Hello from a new lurker

2017-11-01 Thread brent bejot
Hello everyone, The python-dev website said I should introduce myself before lurking around for a while. So hi! I've been using python for 7 or so years now, live on the east coast of the U.S., grew up in Nebraska, and occasionally play the tuba and table-top games (through rarely together). I'