Ethan Furman <et...@stoneleaf.us> added the comment:

To move this forward:

The proposal is to add support for a new method, _missing_name_, which is 
called by __getitem__.

If such a method does not exist, the normal AttributeError exception is raised;

otherwise, the _missing_name_ method is called with the invalid name and should 
return a matching member or None;
- if None, the normal AttributeError exception is raised
- if a member, it is returned
- otherwise, a Type(?)Error is raised

----------
title: Enum._missing_ not called for __getattr__ failures -> Enum._missing_ not 
called for __getitem__ failures

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29752>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to