Re: [Python-ideas] globals should accept parenteses for extending beyond 1 line

2017-01-24 Thread Petr Viktorin
On 01/23/2017 10:22 PM, João Matos wrote: Hello, I understand. Python sources are very large. Any pointers to which file defines the global statement syntax? Consider joining the core-mentorship list for questions like these: https://mail.python.org/mailman/listinfo/core-mentorship Anyway, Py

Re: [Python-ideas] globals should accept parenteses for extending beyond 1 line

2017-01-24 Thread Brett Cannon
On Tue, 24 Jan 2017 at 01:42 Petr Viktorin wrote: > On 01/23/2017 10:22 PM, João Matos wrote: > > Hello, > > > > I understand. > > Python sources are very large. Any pointers to which file defines the > > global statement syntax? > > Consider joining the core-mentorship list for questions like th

[Python-ideas] pathlib suggestions

2017-01-24 Thread Todd
I have been using pathlib, and I have come up with a few suggestions on what would make the module more useful for me (and hopefully others): First, for me, extensions are primarily useful as a single unit. So, practically speaking, the extension of "spam.tar.gz" isn't ".gz", it is ".tar.gz". So

Re: [Python-ideas] pathlib suggestions

2017-01-24 Thread Ryan Gonzalez
As another suggestion, I'd love an rmtree method analogous to shutil.rmtree. And maybe also a remove method, that basically does: if path.is_dir(): path.rmtree() else: path.unlink() \-- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone

Re: [Python-ideas] pathlib suggestions

2017-01-24 Thread Chris Angelico
On Wed, Jan 25, 2017 at 7:30 AM, Todd wrote: > First, for me, extensions are primarily useful as a single unit. So, > practically speaking, the extension of "spam.tar.gz" isn't ".gz", it is > ".tar.gz". So it would be nice to have some properties to make it easier to > deal with the "complete" e

Re: [Python-ideas] pathlib suggestions

2017-01-24 Thread Todd
On Tue, Jan 24, 2017 at 4:27 PM, Chris Angelico wrote: > On Wed, Jan 25, 2017 at 7:30 AM, Todd wrote: > > First, for me, extensions are primarily useful as a single unit. So, > > practically speaking, the extension of "spam.tar.gz" isn't ".gz", it is > > ".tar.gz". So it would be nice to have

Re: [Python-ideas] pathlib suggestions

2017-01-24 Thread Vamsi Krishna Avula
(I have a small question, I hope it's not off-topic for this thread.) What was the rationale behind an explicit `iterdir` method? Why not simply make the `Path` objects iterable? From: Python-ideas on behalf of Todd Sent: Wednesday, January 25, 2017 3:3

[Python-ideas] pathlib suggestions

2017-01-24 Thread Stephen J. Turnbull
I'm just going to let fly with the +1s and -1s, don't take them too seriously, they're basically impressionistic (I'm not a huge user of pathlib yet). Todd writes: > So although the names are tentative, perhaps there could be a "fullsuffix" > property to return the extensions as a single string