On 24/08/2010 01:25, Nick Coghlan wrote:
On Tue, Aug 24, 2010 at 8:15 AM, Nick Coghlanncogh...@gmail.com wrote:
Now, it may be worth considering an addition to the inspect module
that was basically:
def getattr_static(obj, attr):
Retrieve attributes without triggering dynamic lookup via
On 08/23/2010 04:56 PM, Guido van Rossum wrote:
On Mon, Aug 23, 2010 at 7:46 AM, Benjamin Petersonbenja...@python.org wrote:
2010/8/23 Yury Selivanovyseliva...@gmail.com:
1) I propose to change 'hasattr' behaviour in Python 3, making it to swallow
only AttributeError exceptions (exactly
On Tue, 24 Aug 2010 11:09:10 am Guido van Rossum wrote:
On Mon, Aug 23, 2010 at 4:56 PM, Steven D'Aprano st...@pearwood.info
wrote:
[...]
I have always thought that hasattr() does what it says on the box:
it tests for the *existence* of an attribute, that is, one that
statically exists
2010/8/24 Hrvoje Niksic hrvoje.nik...@avl.com:
The __length_hint__ lookup expects either no exception or AttributeError,
and will propagate others. I'm not sure if this is a bug. On the one hand,
throwing anything except AttributeError from __getattr__ is bad style (which
is why we fixed the
2010/8/24 Hrvoje Niksic hrvoje.nik...@avl.com:
On 08/24/2010 02:31 PM, Benjamin Peterson wrote:
2010/8/24 Hrvoje Niksichrvoje.nik...@avl.com:
The __length_hint__ lookup expects either no exception or
AttributeError,
and will propagate others. I'm not sure if this is a bug. On the one
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other than AttributeError
from __getattr__ and friends is almost certainly a bug waiting to happen, and
FYI, best practice for __getattr__ is generally to bail with an
AttributeError as soon as you see
2010/8/24 P.J. Eby p...@telecommunity.com:
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other than AttributeError from
__getattr__ and friends is almost certainly a bug waiting to happen, and
FYI, best practice for __getattr__ is generally to bail
On 8/24/2010 9:45 AM, Benjamin Peterson wrote:
2010/8/24 Hrvoje Niksic hrvoje.nik...@avl.com:
On 08/24/2010 02:31 PM, Benjamin Peterson wrote:
2010/8/24 Hrvoje Niksichrvoje.nik...@avl.com:
The __length_hint__ lookup expects either no exception or
AttributeError,
and will propagate
On Tue, Aug 24, 2010 at 4:51 AM, Steven D'Aprano st...@pearwood.info wrote:
But that's the thing... as far as I am concerned, a dynamically defined
attribute *doesn't* exist. If it existed, __getattr__ would never be
called. A minor semantic difference, to be sure, but it's real to me.
Eh? If
On Tue, 24 Aug 2010 09:26:09 -0500, Benjamin Peterson benja...@python.org
wrote:
2010/8/24 P.J. Eby p...@telecommunity.com:
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other than AttributeError from
__getattr__ and friends is almost certainly
2010/8/24 R. David Murray rdmur...@bitdance.com:
On Tue, 24 Aug 2010 09:26:09 -0500, Benjamin Peterson benja...@python.org
wrote:
2010/8/24 P.J. Eby p...@telecommunity.com:
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other than AttributeError
On Aug 24, 2010, at 10:26 AM, Benjamin Peterson wrote:
2010/8/24 P.J. Eby p...@telecommunity.com:
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other than
AttributeError from
__getattr__ and friends is almost certainly a bug waiting to
happen,
2010/8/24 James Y Knight f...@fuhm.net:
On Aug 24, 2010, at 10:26 AM, Benjamin Peterson wrote:
2010/8/24 P.J. Eby p...@telecommunity.com:
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other than AttributeError from
__getattr__ and friends is
At 10:13 AM 8/24/2010 -0500, Benjamin Peterson wrote:
2010/8/24 James Y Knight f...@fuhm.net:
On Aug 24, 2010, at 10:26 AM, Benjamin Peterson wrote:
2010/8/24 P.J. Eby p...@telecommunity.com:
At 03:37 PM 8/24/2010 +0200, Hrvoje Niksic wrote:
a) a business case of throwing anything other
I was happy to see the new `getcallargs` function in the `inspect` module.
But there's one thing I want to do that's related to it, and maybe this was
implemented somewhere or someone can give me some pointers about it.
I want to have a function that takes the results of `getargspec` and
On Aug 24, 2010, at 8:31 AM, Benjamin Peterson wrote:
2010/8/24 Hrvoje Niksic hrvoje.nik...@avl.com:
The __length_hint__ lookup expects either no exception or AttributeError,
and will propagate others. I'm not sure if this is a bug. On the one hand,
throwing anything except AttributeError
Hello fellow Pythoneers and Pythonistas,
I'm very happy to announce the release of Python 2.6.6. A truly impressive
number of bugs have been fixed since Python 2.6.5. Source code and Windows
installers for Python 2.6.6 are now available here:
http://www.python.org/download/releases/2.6.6/
On 8/24/2010 12:40 AM, python-dev-requ...@python.org wrote:
Message: 4 Date: Mon, 23 Aug 2010 17:21:50 -0700 From: Brett Cannon
br...@python.org
It is also non-obvious to any beginner. Are we really going to want to
propagate the knowledge of this trick as a fundamental idiom? I would
rather
On Aug 24, 2010, at 12:31 PM, Barry Warsaw wrote:
Hello fellow Pythoneers and Pythonistas,
I'm very happy to announce the release of Python 2.6.6.
Thanks Barry :-)
Raymond
___
Python-Dev mailing list
Python-Dev@python.org
On Aug 24, 2010, at 03:31 PM, Barry Warsaw wrote:
Python 2.6.6 marks the end of regular maintenance releases for the
Python 2.6 series. From now until October 2013, only security
related, source-only releases of Python 2.6 will be made available.
After that date, Python 2.6 will no longer be
Steven D'Aprano wrote:
But that's the thing... as far as I am concerned, a dynamically defined
attribute *doesn't* exist.
Maybe for your particular use case, but the concept of
whether an attribute is dynamically defined or not is
not well-defined in general.
Consider an object that is
Le mercredi 25 août 2010 01:12:40, Barry Warsaw a écrit :
merwok asks on IRC whether documentation changes to release26-maint will be
allowed. I can sympathize with the 'allow' argument; Python 2.6 is still
either the default version or soon to be the new default in several
distributions, and
22 matches
Mail list logo