http://www.python.org/peps/pep-0343.html
I should add that IMO this obsoletes PEP 288 and PEP 325; I plan to
reject those when PEP 343 is accepted. I've already withdrawn PEP 340.
PEP 342 is separate (but I'll probably present it together with PEP
343).
--
--Guido van Rossum (home page: http
[Guido van Rossum]
http://www.python.org/peps/pep-0343.html
[Phillip J. Eby]
Looks great. A few questions/comments:
* What's the rationale for raising TypeError from close()? Wasn't
RuntimeError discussed previously for that role? (and it's also used by
the with_template example
exception or reaches a yield-statement.
I'll summarize this discussion in the PEP.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe
, and it is invoked from a
finally-clause (the one implicit in the with-statement) which
re-raises the original exception anyway.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http
an
earlier proposal to skip calling __exit__() when it doesn't exist?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
; there can be a single
opcode that calls __enter__ and sets up the try-finally context.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
--
Mail address is perfectly valid!
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum
://wiki.python.org/moin/WithStatement).
I think this is a good one; I hope people agree. Its acceptance will
obsolete about 4 other PEPs! (A sign that it fulfills a need and that
the proposed solution is powerful.)
--
--Guido van Rossum (home page: http://www.python.org/~guido
On 6/5/05, Martin v. Löwis [EMAIL PROTECTED] wrote:
Guido van Rossum wrote:
@with_template
def closing(obj):
try:
yield obj
finally:
obj.close()
I just realized this has a race condition. The bytecode for the
expression closing(open(...)) must
to state that
VAR must be a single variable or a list of variables IN PARENTHESES.
Thoughts?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
. throw() it is.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive
meme, so I can't help you here.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options
the reduction of boiler-plate
code involving try-finally, and that is typically not used for
resource release (unless you count locks, where RAII is inappropriate
-- at least in Python).
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python
be a major backward incompatibility
because the guarantees made to __exit__() are different.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python
did this when x is a simple
local variable. For locals, we *know* that no side effect of any
expression can change the value.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http
can show us some motivating use cases.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman
having until indented? You didn't give
any examples with multiple occurrences. A single occurrence works just
fine unindented, as PEP 315 has already shown.
The indented until sounds like unnecessary syntactic sugar for 'if X:
break' -- not very Pythonic.
--
--Guido van Rossum (home page: http
.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options
. Maybe I will have to solve
this second problem by myself but I just wrote in case anybody had a good
idea.
That one's not so easy; there's no standard solution for this problem.
I recommend that you follow Aahz' suggestion of asking on c.l.py
instead.
--
--Guido van Rossum (home page: http
in this, they should get a free
Intel T-shirt.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options
in as an argument to the
generator.
Someone should really come up with some realistic coroutine examples
written using PEP 342 (with or without continue EXPR).
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http://www.python.org/~guido
On 6/16/05, Guido van Rossum [EMAIL PROTECTED] wrote:
Agreed. I don't want to add sorting abilities (with all its infinite
variants) to every data structure -- or even one or two common data
structures. You want something sorted that's not already a list? Use
the sorted() method.
I meant
please. These examples are especially jarring:
range(range(5), range(10), range(2))
[5, 7, 9]
(etc.)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org
) but this breaks symmetry with
range/xrange which still accept float args.
Raymond
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python
hypothetical -- unlike that for g.next(EXPR) and VAR = yield.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http://www.python.org/~guido
it will in Python 3.0).
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive
-- vacationing with
little connectivity until EuroPython starts next week.)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
an unsigned long by 3 would be x = (x * 3)
0x.
If there is a problem with ioctl() not taking long ints, that would be
a bug in ioctl, not a lacking data type or a problem with long ints.
--
--Guido van Rossum (home page: http://www.python.org/~guido
On 6/20/05, Keith Dart [EMAIL PROTECTED] wrote:
On Mon, 20 Jun 2005, Guido van Rossum wrote:
[...]
By far the easiest way to do arithmetic mod 2**32 is to just add
0x to the end of your expression. For example, simulating the
effect of multiplying an unsigned long by 3 would be x
is in the API wrappers,
not in the integer types.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org
new objects, but
instead use self.__class__(somestr).
Clearly it needs a PEP.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
anywhere near a persistent store.
You misunderstand the datetime module! You can have a datetime object
whose timezone is UTC; or you can have a convention in your API that
datetime objects without timezone represent UTC.
--
--Guido van Rossum (home page: http://www.python.org/~guido
for using tz-less datetime objects to represent UTC.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org
-specific code.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive
be an issue, then write
conditional code that uses either a string or unicode string to hold
paths whenever a new path is created.
Then maybe the code that handles Unicode paths in arguments should be
fixed rather than adding a module that encapsulates a work-around...
--
--Guido van Rossum (home
Guido van Rossum:
Then maybe the code that handles Unicode paths in arguments should be
fixed rather than adding a module that encapsulates a work-around...
On 7/3/05, Neil Hodgson [EMAIL PROTECTED] wrote:
It isn't clear whether you are saying this should be fixed by the
user
this before sending, you
may be embarrassed in public or confuse the addressee.
Is this behavior of the checkins list really a good idea?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http
, but it would be very nice
IMO if something of this sort could be implemented in a future version
of Python.
I don't think so. It smells too much of DWIM, which is very unpythonic. EIBTI.
--
--Guido van Rossum (home page: http://www.python.org/~guido
dynamic nature:
for decoder in foo_decode, bar_decode, foobar_decode:
try:
data = decoder(data)
break
except ValueError:
print data doesn't seem to be %s-encoded % decoder.__name__
--
--Guido van Rossum (home page: http://www.python.org/~guido
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
.)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
anyway so I'd be -1 even if the PEP was still under discussion).
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
(e.g. an else clause :) was available.
How would a PEP to *remove* this feature fare today?
Unhelpfully,
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman
Python seriously. That translation specifies a
simple assignment to VAR, and that's what I meant (and what I'm sure
most folks understood). IOW VAR lives in the surrounding scope,
overwrites a previous value, and survives past the with-statement
(unless it is set inside of course).
--
--Guido van
functions will handle this
fine, *printing* Unicode still doesn't work by default. :-( I can't
wait until we switch everything to Unicode and have encoding on all
streams...
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev
On 7/10/05, Andrew Durdin [EMAIL PROTECTED] wrote:
On 7/7/05, Guido van Rossum [EMAIL PROTECTED] wrote:
I don't think so. It smells too much of DWIM, which is very unpythonic.
EIBTI.
In what way? The scheme described is explicit, and consistently
applied to all triple-quoted strings
/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free !
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
for this, BTW, is to take *existing* Python code that
was written using print statements and wrap it in something that
captures its output. The f.write() or printf solutions won't work
there...
--
--Guido van Rossum (home page: http://www.python.org/~guido
list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
FWIW, I've updated PEP 343 to use @contextmanager and class
ContextWrapper. Please proofread.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo
On 7/15/05, Ron Adam [EMAIL PROTECTED] wrote:
[several new syntax proposals]
Please stop proposing new syntax. The PEP was accepted after quite
enough back-and-forth; there's no point opening this up yet again.
--
--Guido van Rossum (home page: http://www.python.org/~guido
a minor nit, however -- thanks for finding the memory leak!
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
On 7/27/05, Steven Bethard [EMAIL PROTECTED] wrote:
Here's the draft for the first half of July.
Thanks! This is looking great! (Although I can't help you with the
GCC/C++ thread -- I've been avoiding that one like the plague myself.
:-)
To all the contributors, great job guys!
--
--Guido van
to be stricter).
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev
that Raisable is a bad name to use since it is not
an actual word [python-dev1]_.
Then we'll make it a word. Is Java's equivalent, Throwable, any more
a word? In this case I like the parallel with Java.
Should Bare ``except`` Clauses be Removed?
Yes, see above.
--
--Guido van Rossum (home page: http
scribbling,
the former when the interpreter is still intact.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
On 8/3/05, Brett Cannon [EMAIL PROTECTED] wrote:
On 8/3/05, Guido van Rossum [EMAIL PROTECTED] wrote:
So here's a radical proposal (hear the scratching of the finglernail
on the blackboard? :-).
Start with Brett's latest proposal.
Including renaming (I want to know if you support
RuntimeError. (I
think there are a few more uses of it inside Python itself; I don't
think it's worth inventing new exceptions for all these.)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http
One more thing. Is renaming NameError to NamespaceError really worth
it? I'd say that NameError is just as clear.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org
or StopIteration
reach the outer level of an app, it's a bug like all the others that
bare 'except:' WANTS to catch.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman
away in Python
3000. Please update the PEP.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman
, so
why couldn't str() be allowed to return a Unicode string?
The main problem for a smooth Unicode transition remains I/O, in my
opinion; I'd like to see a PEP describing a way to attach an encoding
to text files, and a way to decide on a default encoding for stdin,
stdout, stderr.
--
--Guido van
How do you then supply a traceback to the raise statement?
raise ValueError, ValueError(blah), tb
Maybe in Py3K this could become
raise ValueError(bloop), tb
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing
that the way we build
up the traceback by linking backwards, this may not necessarily work
right. I guess somebody has to try to implement PEP 344 in order to
find out.
(In fact, I think trying to implement PEP 344 would be an *excellent*
way to validate it.)
--
--Guido van Rossum (home page: http
,
or if the terminal's encoding is not supported or cannot be determined).
So there is. Wow! I never kew this. How does it work? Can we use this
for writing to files to?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
return something whose
type is not 'file' -- once again making a distinction between open and
file.) Do these files support universal newlines? IMO they should.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
.
The docs say that it returns a new object, so that's in order too.
It's not listed in refcounts.dat; that seems an omission (or perhaps
the function's varargs signature doesn't fit in the pattern?).
--
--Guido van Rossum (home page: http://www.python.org/~guido
on text() unless
someone explains what's so attractive about it.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
... But it is definitely of concern.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev
a __del__ method
will get invoked by magic at most once on any given object O, no
matter how often O is resurrected.
I'm sympathetic to this one. Care to write a PEP? It could be really
short and sweet as long as it provides enough information to implement
the feature.
--
--Guido van Rossum
van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
On 8/11/05, James Y Knight [EMAIL PROTECTED] wrote:
If that's true, this is hardly worth discussing as
3.0 is never going to happen anyways.
You are wrong. So wrong.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev
of
bound methods and callables so completely as Python. Every
callable is in a sense a closure (or can be). Nested functions are
other examples.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev
we want to encourage widespread experimentation
with the Python source code?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-- Forwarded message --
From: Mark Shuttleworth [EMAIL PROTECTED]
Date: Aug 11, 2005 12:13 PM
Subject: Distributed RCS
To: Guido van Rossum
Another fwd, describing how Steve Alexander's group user bazaar.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-- Forwarded message --
From: Steve Alexander [EMAIL PROTECTED]
Date: Aug 12, 2005 4:00 PM
Subject: Re: Distributed RCS
To: Guido van Rossum [EMAIL
of its own medicine -- I hope
everybody who found a bug in their tools submitted a patch! :-)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python
doesn't just run on Unix and Windows.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http://www.python.org/~guido
---
Thanks in advance,
Michael Krasnyk
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van
exceptions be more like
SystemExit or more like KeyboardInterrupt, or neither? If you mean
them to be excluded by base except:, you can always subclass
BaseException, which exists for this purpose.
--
--Guido van Rossum (home page: http://www.python.org/~guido
.
Tim Delaney
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/guido%40python.org
--
--Guido van Rossum (home page: http
that an attribute name is something
acceptable to getattr() or setattr().
Following this definition, the string 1 is a valid attribute name
(even though it's not a valid identifier), but the number 1 is not.
Try it. :-)
--
--Guido van Rossum (home page: http://www.python.org/~guido
van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
from those, stripping non-strings in dir()
would be a big help towards making the invariant true. So I'm +1 on
that.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org
it.
You also can't/shouldn't call a variable 'class', 'def', or 'len' -- but I
don't see any movement to allow these...
Please don't propagate the confusion between reserved keywords and
built-in names!
--
--Guido van Rossum (home page: http://www.python.org/~guido
to functional,
as attrgetter and itemgetter are already in operator. But, perhaps,
they should be in functional.
They feel related to attrgetter more than to partial.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing
On 8/19/05, Jeremy Hylton [EMAIL PROTECTED] wrote:
On 8/18/05, Guido van Rossum [EMAIL PROTECTED] wrote:
On 8/17/05, Anthony Baxter [EMAIL PROTECTED] wrote:
If you _really_ want to call a local variable 'id' you can (but
shouldn't).
Disagreed. The built-in namespace is searched last
On 8/20/05, Anthony Baxter [EMAIL PROTECTED] wrote:
On Friday 19 August 2005 02:22, Guido van Rossum wrote:
On 8/17/05, Anthony Baxter [EMAIL PROTECTED] wrote:
If you _really_ want to call a local variable 'id' you can (but
shouldn't).
Disagreed. The built-in namespace is searched
.) I just received a recommendation for wush.net which specializes
in svn hosting. $90/month for 5 Gb of disk space sounds like a good
deal and easily within the PSF budget.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev
.
If we syntactically enforce that the bare except, if present, must be
last, would that remove your objection? I agree that a bare except in
the middle is an anomaly, but that doesn't mean we can't keep bare
except: as a shorthand for except Exception:.
--
--Guido van Rossum (home page: http
a deprecation warning and
still have your code be correct in the face of documented features of
python.
I agree; isn't that already in ther PEP? This surely has been the
thinking all along.
--
--Guido van Rossum (home page: http://www.python.org/~guido
. BaseException).
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive
sure that *don't* use a particular feature: it's just as easy to
grep your source code for except:. __future__ is in general only
used to enable new syntax that previously has a different meaning.
Anyway, you can make it an error globally by using the -W option creatively.
--
--Guido van Rossum
On 8/24/05, James Y Knight [EMAIL PROTECTED] wrote:
On Aug 24, 2005, at 9:39 PM, Brett Cannon wrote:
On 8/24/05, Guido van Rossum [EMAIL PROTECTED] wrote:
On 8/24/05, James Y Knight [EMAIL PROTECTED] wrote:
I think it must be the case that raising an object which does not
derive from
for Perl 6? :-)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive
PEP 344?)
If you need to raise exceptions fast, pre-instantiate an instance.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
201 - 300 of 5880 matches
Mail list logo