Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-01-31 Thread Vitor Bosshard
2010/1/31 Nick Coghlan : > Georg Brandl wrote: >> Then why did Subversion choose to follow the CVS way and create a >> subdirectory in each versioned directory?  IMO, this is much more >> annoying given the alternative of a single .hg/.bzr/whatever directory. >> For .pyc vs .pyr, you didn't have th

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-01-31 Thread Vitor Bosshard
2010/1/31 Georg Brandl : >> >> foo.py >> foo.pyr/ >>   cpython-25.pyc >>   cpython-25U.pyc >>   cpython-27.pyc >>   cpython-27U.pyc >>   cpython-32.pyc >>   unladen-011.pyc >>   wpython-11.pyc > > +1.  It should be quite easy to assign a new name every time the magic > number is updated. > >> If we

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-01-30 Thread Vitor Bosshard
2010/1/31 Nick Coghlan : >> Can't a VCS be configured to ignore a .pyr directory just as easily as >> it can be configured to ignore a .pyc file? > > Yes they can. Of course they can, but not out of the box. It was just an example off the top of my head. A trickier case: My GUI app offers scrip

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-01-30 Thread Vitor Bosshard
2010/1/31 Nick Coghlan : > Vitor Bosshard wrote: >> Why not: >> >> foo.py >> foo.pyc # < 2.7 or < 3.2 >> foo.27.pyc >> foo.32.pyc >> etc. >> >> >> This is simpler and more logical than the current subfolder proposal, >> a

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-01-30 Thread Vitor Bosshard
2010/1/30 Barry Warsaw : > > Multiple file extensions > > > The PEP author also considered an approach where multiple thin byte > compiled files lived in the same place, but used different file > extensions to designate the Python version.  E.g. foo.pyc25, > foo.pyc26, foo.

Re: [Python-Dev] Retrieve an arbitrary element from a set without removing it

2009-10-23 Thread Vitor Bosshard
2009/10/23 Willi Richert : > Hi, > > recently I wrote an algorithm, in which very often I had to get an arbitrary > element from a set without removing it. > > Three possibilities came to mind: > > 1. > x = some_set.pop() > some_set.add(x) > > 2. > for x in some_set: >        break > > 3. > x = ite

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-21 Thread Vitor Bosshard
- Mensaje original > De: Gerald Britton > Para: rdmur...@bitdance.com > CC: python-dev@python.org > Enviado: miércoles, 21 de enero, 2009 11:38:01 > Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator > expressions > > FWIW, there are a few historic languages that imple

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Vitor Bosshard
- Mensaje original > De: Gerald Britton > Para: Vitor Bosshard > CC: python-3...@udmvt.ru; python-dev@python.org > Enviado: martes, 20 de enero, 2009 13:40:07 > Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator > expressions > >

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Vitor Bosshard
- Mensaje original > De: "python-3...@udmvt.ru" > Para: Gerald Britton > CC: python-dev@python.org > Enviado: martes, 20 de enero, 2009 11:18:24 > Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator > expressions > > May I suggest you this variant? > >     def raiseSt

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-19 Thread Vitor Bosshard
- Mensaje original > De: Gerald Britton > Para: Terry Reedy > CC: python-dev@python.org > Enviado: lunes, 19 de enero, 2009 15:03:47 > Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator > expressions > > Duly noted and thanks for the feedback!  (just what I was lo

Re: [Python-Dev] if-syntax for regular for-loops

2008-10-03 Thread Vitor Bosshard
- Mensaje original > De: Leif Walsh <[EMAIL PROTECTED]> > Para: Andreas Nilsson <[EMAIL PROTECTED]> > CC: python-dev@python.org > Enviado: viernes, 3 de octubre, 2008 10:29:33 > Asunto: Re: [Python-Dev] if-syntax for regular for-loops > > On Fri, Oct 3, 2008 at 6:10 AM, Andreas Nilsson