[Python-Dev] 'hasattr' is broken by design (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Tue Aug 24 00:39:37 CEST 2010
- Previous message: [Python-Dev] 'hasattr' is broken by design
- Next message: [Python-Dev] 'hasattr' is broken by design
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Aug 24, 2010 at 8:25 AM, Benjamin Peterson <benjamin at python.org> wrote:
2010/8/23 Yury Selivanov <yselivanov at gmail.com>:
So, the proposed magic method is not intended to change the protocol, but to complement and enhance it. But it still raises the potential to break the relationship between hasattr and getattr. I think this should require a PEP.
Definitely needs a PEP, and will require some solid use cases to explain why allowing optimisation of hasattr() is the right way to go. Complexity isn't free, and I doubt the gains here will justify the costs, but that's one of the things the PEP process is intended to figure out.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] 'hasattr' is broken by design
- Next message: [Python-Dev] 'hasattr' is broken by design
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]