On 24 maj 2013, at 14:22, Ronan Lamy <ronan.l...@gmail.com> wrote:

>> 2013/5/24 Ethan Furman <et...@stoneleaf.us>
>> What would you suggest happen in this case?
> Raise a ValueError, maybe? In that case, there needs to be a way to force the 
> overriding when it is explicitly desired. One way would be to allow 
> unregistering implementations: overriding is then done by unregistering the 
> old implementation before defining the new one.

Unfortunately this isn't going to work because the order of imports
might change during the life cycle of a program. Especially if you
wish to expose registering to users, the order of imports cannot be
guaranteed.

I recognize the need for such behaviour to be discoverable. This is
important for debugging purposes. This is why I'm going to let users
inspect registered overloads, as well as provide their own mapping
for the registry. I'm working on the reference implementation now,
stay tuned.

-- 
Best regards,
Łukasz Langa

WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev

_______________________________________________
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

Reply via email to