Re: [Python-Dev] PEP 377 - allow __enter__() methods to skip the statement body

2009-03-15 Thread Tristan Seligmann
On Mon, Mar 16, 2009 at 1:00 AM, Michael Foord wrote: > You didn't include all the code - so impossible to match the exact > semantics. Breaking out of multiple loops with a return is a cleaner way to > handle it IMHO. I don't really see why this is cleaner; they're both just structured gotos. He

Re: [Python-Dev] Filename as byte string in python 2.6 or 3.0?

2008-09-29 Thread Tristan Seligmann
* Gregory P. Smith <[EMAIL PROTECTED]> [2008-09-28 13:34:50 -0700]: > since any given path (not just fs) can have its own encoding it makes > the most sense to me to let the OS deal with the errors and not try to > enforce bytes vs string encoding type at the python lib. level. But the underlying

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-07-13 Thread Tristan Seligmann
* Stephen J. Turnbull <[EMAIL PROTECTED]> [2008-07-14 08:51:27 +0900]: > The analogy to the fact that True != not not 10 is telling, I think. What? >>> True == (not not 10) True -- mithrandi, i Ainil en-Balandor, a faer Ambar signature.asc Description: Digital signature __

Re: [Python-Dev] Warn about mktemp once again?

2008-05-06 Thread Tristan Seligmann
* Antoine Pitrou <[EMAIL PROTECTED]> [2008-05-06 10:47:23 +]: > pobox.com> writes: > > > > Back in r29829, Guido commented out the security hole warning for > > tempfile.mktemp: > > > [...] > > > > Comment out the warnings about mktemp(). These are too annoying, and > > often unav

Re: [Python-Dev] Python 3000: Special type for object attributes & map keys

2008-03-19 Thread Tristan Seligmann
* Neal Norwitz <[EMAIL PROTECTED]> [2008-03-18 18:54:47 -0500]: > First, you should measure the current speed difference. Something like: > > $ ./python.exe -m timeit -s 'd = {1: None}' 'd[1]' > 100 loops, best of 3: 0.793 usec per loop > $ ./python.exe -m timeit -s 'd = {"1": None}' 'd["1"]

Re: [Python-Dev] #! magic (was PEP: per user site-packages directory)

2008-01-20 Thread Tristan Seligmann
* Oleg Broytmann <[EMAIL PROTECTED]> [2008-01-20 20:12:38 +0300]: > On Sun, Jan 20, 2008 at 06:00:31PM +0100, Christian Heimes wrote: > > #!/usr/bin/env python -E -s > >On most Unicies #! magic may have only one parameter after the program; > the program here is env, the parameter is python,

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-07 Thread Tristan Seligmann
* Barry Warsaw <[EMAIL PROTECTED]> [2008-01-07 16:01:42 -0500]: > On Jan 7, 2008, at 11:37 AM, Phillip J. Eby wrote: > > >> Python automatically adds ~/.python/site-packages to sys.path; this > >> is > >> added /before/ the system site-packages file. An open question is > >> whether it needs t

Re: [Python-Dev] PEP Idea: Syntactic sugar for StopIteration.

2007-12-08 Thread Tristan Seligmann
* Phillip J. Eby <[EMAIL PROTECTED]> [2007-12-08 20:19:29 -0500]: > At 07:55 PM 12/8/2007 -0500, Manuel Alejandro CerĂ³n Estrada wrote: > >2007/12/8, Greg Ewing <[EMAIL PROTECTED]>: > > > I would put it the other way around -- the problem > > > that 'yield break' is meant to solve is already solved

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Tristan Seligmann
* Terry Reedy <[EMAIL PROTECTED]> [2007-11-16 18:31:12 -0500]: > > "Gustavo Carneiro" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > |I am finding myself often doing for loops over a subset of a list, like: > | > |for r in results: > |if r.numNodes != numNode

Re: [Python-Dev] Summary of Tracker Issues

2007-05-17 Thread Tristan Seligmann
* Andrew McNamara <[EMAIL PROTECTED]> [2007-05-17 15:30:43 +1000]: > technique could be used, but my suspicion is that real people are being > paid a pittance to sit in front of a PC and spam anything that moves. http://www.mturk.com/mturk/welcome Complete simple tasks that people do better than

Re: [Python-Dev] [Python-3000] Pre-pre PEP for 'super' keyword

2007-04-29 Thread Tristan Seligmann
* Guido van Rossum <[EMAIL PROTECTED]> [2007-04-29 18:19:20 -0700]: > > In my mind, 'if' and 'or' are "syntax", whereas things like 'None' or > > 'True' are "values"; even if None becomes an actual keyword, rather than > > a builtin. > > I'm sorry, but that is such an incredibly subjective differ

Re: [Python-Dev] [Python-3000] Pre-pre PEP for 'super' keyword

2007-04-29 Thread Tristan Seligmann
* Guido van Rossum <[EMAIL PROTECTED]> [2007-04-29 16:30:18 -0700]: > On 4/29/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > > So it is a "keyword" in the sense that None is a keyword; not in the > > stronger sense that "if" is a keyword? > > Um, how do you see those two differ? Is 'if' a keyword in

Re: [Python-Dev] datetime module enhancements

2007-03-10 Thread Tristan Seligmann
* Christian Heimes <[EMAIL PROTECTED]> [2007-03-10 03:58:27 +0100]: > >From the README.txt > pytz brings the Olson tz database into Python. This library allows > accurate and cross platform timezone calculations using Python 2.3 > or higher. It also solves the issue of ambiguous times at the end >

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Tristan Seligmann
* Ben North <[EMAIL PROTECTED]> [2007-02-11 23:45:05 +]: > Dynamic attribute access is currently possible using the "getattr" > and "setattr" builtins. The present PEP suggests a new syntax to > make such access easier, allowing the coder for example to write > > x.('foo_

Re: [Python-Dev] Trial balloon: microthreads library in stdlib

2007-02-14 Thread Tristan Seligmann
* Richard Tew <[EMAIL PROTECTED]> [2007-02-14 16:49:03 +]: > I am not writing a competing event driven mechanism. What I was doing > was feeling out whether there was any interest in better support for > asynchronous calls. I interpreted your suggestions as being about enhancing asyncore wit

Re: [Python-Dev] Trial balloon: microthreads library in stdlib

2007-02-12 Thread Tristan Seligmann
* Richard Tew <[EMAIL PROTECTED]> [2007-02-12 13:46:43 +]: > I currently use Windows. By using asyncore and monkeypatching in a > replacement socket module based on it [1] I can give users of Stackless > socket operations which invisibly block at the microthread level allowing > the scheduler

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-22 Thread Tristan Seligmann
* Greg Ewing <[EMAIL PROTECTED]> [2006-03-21 13:20:53 +1200]: > Gareth McCaughan wrote: > > > but wouldn't if be nice if you could say > > > > def f((x0,y0) as p0, (x1,y1) as p1): > > I'm not sure that it would. Currently you can look at > a function header and get a picture of its calling

Re: [Python-Dev] PEP 3000 and new style classes

2005-09-08 Thread Tristan Seligmann
* Lisandro Dalcin <[EMAIL PROTECTED]> [2005-09-08 13:56:07 -0300]: > Yes, you are right. But this way, you are making explicit a behavior > that will be implicit in the future. > > For example, we could also do: > > two = float(4)/float(2) > > instead of > > from __future__ import div