Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread Nick Coghlan
On 22 March 2015 at 07:46, Barry Warsaw wrote: > On Mar 21, 2015, at 05:00 PM, Donald Stufft wrote: > >>I sort of think (though I haven’t completely convinced myself) that adding >>something like __version__ to a package is a work around to the fact that >>we don’t have an API that lets someone as

Re: [Python-Dev] 0-base and 1-base indexed iterables? Custom slicing rules?

2015-03-21 Thread Glenn Linderman
On 3/21/2015 10:46 PM, pedro santos wrote: Hi, I'm an Art and CG student learning Python and today's exercise was about positions in a tiled room. The fact that I had to check if a position was inside the room and given that in a 1x1 room, 0.0 was considered in and 1.0 was considered out, it

Re: [Python-Dev] How to document functions with optional positional parameters?

2015-03-21 Thread Nick Coghlan
On 22 March 2015 at 04:47, Terry Reedy wrote: > On 3/21/2015 12:41 AM, Serhiy Storchaka wrote: >> >> How to document functions with optional positional parameters? >> >> For example binascii.crc32(). It has two positional parameters, one is >> mandatory, and one is optional with default value 0. W

[Python-Dev] 0-base and 1-base indexed iterables? Custom slicing rules?

2015-03-21 Thread pedro santos
Hi, I'm an Art and CG student learning Python and today's exercise was about positions in a tiled room. The fact that I had to check if a position was inside the room and given that in a 1x1 room, 0.0 was considered in and 1.0 was considered out, it kept me thinking about 0-base indexing iterables

Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread Barry Warsaw
On Mar 21, 2015, at 05:00 PM, Donald Stufft wrote: >I sort of think (though I haven’t completely convinced myself) that adding >something like __version__ to a package is a work around to the fact that >we don’t have an API that lets someone ask “what is the distribution and >version that this mod

Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread Donald Stufft
> On Mar 21, 2015, at 5:17 PM, MRAB wrote: > > On 2015-03-21 21:00, Donald Stufft wrote: >> >>> On Mar 21, 2015, at 4:53 PM, Barry Warsaw wrote: >>> >>> On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote: >>> FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody >>>

Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread MRAB
On 2015-03-21 21:00, Donald Stufft wrote: On Mar 21, 2015, at 4:53 PM, Barry Warsaw wrote: On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote: FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody manages these correctly. Note that the PEP 8 section starts with less tha

Re: [Python-Dev] Missing *-unpacking generalizations (issue 2292)

2015-03-21 Thread Benjamin Peterson
On Fri, Mar 20, 2015, at 19:16, Neil Girdhar wrote: > Wow, this is an excellent review. Thank you. > > My only question is with respect to this: > > I think there ought to be two opcodes; one for unpacking maps in > function calls and another for literals. The whole function location > thing i

Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread Donald Stufft
> On Mar 21, 2015, at 4:53 PM, Barry Warsaw wrote: > > On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote: > >> FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody >> manages these correctly. Note that the PEP 8 section starts with less than >> an endorsement: "If you *ha

[Python-Dev] Google Summer of Code

2015-03-21 Thread Jim Baker
Jython plans to participate in the Google Summer of Code for 2015. If you are interested, I have outlined a number of projects on our ideas page that students could work on: - Work on JyNI, which adds C extension API support to Jython - Performance optimizations, including startup time -

Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread Barry Warsaw
On Mar 20, 2015, at 09:59 PM, Ian Lee wrote: >shebang >docstring >imports >dunder assignments >other code... I generally put imports after dunders, except for __future__. I want the first screenful of code to contain them, and imports can be a few dozen lines in some modules. -Barry ___

Re: [Python-Dev] some minor questions about pep8

2015-03-21 Thread Barry Warsaw
On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote: >FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody >manages these correctly. Note that the PEP 8 section starts with less than >an endorsement: "If you *have* to have Subversion, CVS, or RCS crud in your >source file, do

Re: [Python-Dev] How to document functions with optional positional parameters?

2015-03-21 Thread Terry Reedy
On 3/21/2015 12:41 AM, Serhiy Storchaka wrote: How to document functions with optional positional parameters? For example binascii.crc32(). It has two positional parameters, one is mandatory, and one is optional with default value 0. With Argument Clinic its signature is crc32(data, crc=0, /). I

Re: [Python-Dev] Use ptyhon -s as default shbang for system python executables/daemons

2015-03-21 Thread Donald Stufft
> On Mar 21, 2015, at 7:52 AM, Nick Coghlan wrote: > > On 19 March 2015 at 07:51, Donald Stufft wrote: >> I’ve long wished that the OS had it’s own virtual environment. A lot of >> problems >> seems to come from trying to cram the things the OS wants with the things >> that >> the user wants

Re: [Python-Dev] Final call for PEP 488: eliminating PYO files

2015-03-21 Thread Eric Snow
On Mar 21, 2015 7:44 AM, "Brett Cannon" wrote: > > Thanks! PEP 488 is now marked as accepted. I expect I will have PEP 488 implemented before the PyCon sprints are over (work will be tracked in http://bugs.python.org/issue23731). > > On Fri, Mar 20, 2015 at 8:06 PM Guido van Rossum wrote: >> >> A

Re: [Python-Dev] Use ptyhon -s as default shbang for system python executables/daemons

2015-03-21 Thread Nick Coghlan
On 21 March 2015 at 22:19, Antoine Pitrou wrote: > On Sat, 21 Mar 2015 21:52:34 +1000 > Nick Coghlan wrote: >> On 19 March 2015 at 07:51, Donald Stufft wrote: >> > I’ve long wished that the OS had it’s own virtual environment. A lot of >> > problems >> > seems to come from trying to cram the th

Re: [Python-Dev] Final call for PEP 488: eliminating PYO files

2015-03-21 Thread Brett Cannon
Thanks! PEP 488 is now marked as accepted. I expect I will have PEP 488 implemented before the PyCon sprints are over (work will be tracked in http://bugs.python.org/issue23731). On Fri, Mar 20, 2015 at 8:06 PM Guido van Rossum wrote: > Awesome, that's what I was hoping. Accepted! Congrats and t

Re: [Python-Dev] Use ptyhon -s as default shbang for system python executables/daemons

2015-03-21 Thread Antoine Pitrou
On Sat, 21 Mar 2015 21:52:34 +1000 Nick Coghlan wrote: > On 19 March 2015 at 07:51, Donald Stufft wrote: > > I’ve long wished that the OS had it’s own virtual environment. A lot of > > problems > > seems to come from trying to cram the things the OS wants with the things > > that > > the user w

Re: [Python-Dev] Fwd: class os.DirEntry is confusing,

2015-03-21 Thread Nick Coghlan
On 21 March 2015 at 10:15, 罗勇刚(Yonggang Luo) wrote: > -- Forwarded message -- > From: 罗勇刚(Yonggang Luo) > Date: 2015-03-21 2:24 GMT+08:00 > Subject: class os.DirEntry is confusing, > To: Python > > > Should be replaced with os.FsEntry or os.ScanEntry The name comes from the unde

Re: [Python-Dev] super() does not work during class initialization

2015-03-21 Thread Nick Coghlan
On 21 March 2015 at 00:03, Martin Teichmann wrote: > The current python fails the assertion, while with my patch everything is > fine, > and I personally think __class__ should always actually refer to the class > being > defined, which means at the minimum that it is actually, well, a class. F

Re: [Python-Dev] Use ptyhon -s as default shbang for system python executables/daemons

2015-03-21 Thread Nick Coghlan
On 19 March 2015 at 07:51, Donald Stufft wrote: > I’ve long wished that the OS had it’s own virtual environment. A lot of > problems > seems to come from trying to cram the things the OS wants with the things that > the user wants into the same namespace. I'm more wanting to go in the other dire

Re: [Python-Dev] Use ptyhon -s as default shbang for system python executables/daemons

2015-03-21 Thread Nick Coghlan
On 19 March 2015 at 02:48, Barry Warsaw wrote: > It's never gotten much farther than musings, but protecting the system against > the weird things people install would be a good thing. OTOH, this feels a lot > like virtual environments so maybe there's something useful to be mined there. I took

Re: [Python-Dev] Needed reviews

2015-03-21 Thread Nick Coghlan
On 19 March 2015 at 19:28, Serhiy Storchaka wrote: > Here is list of my ready for review patches. It is incomplete and contains > only patches for which I don't expect objections or long discussion. Most > of them are relative easy and need only formal review. Most of them wait > for a review m

Re: [Python-Dev] How to document functions with optional positional parameters?

2015-03-21 Thread Victor Stinner
Le samedi 21 mars 2015, Serhiy Storchaka a écrit : > > For example binascii.crc32(). It has two positional parameters, one is mandatory, and one is optional with default value 0. With Argument Clinic its signature is crc32(data, crc=0, /). The \ is useful, it indicates that you cannot use keyw