I like the way you're thinking. In any case, I think there should be some 
standard pattern for this implemented in the standard library.

Perhaps, in addition to the using registration, implement a `__push__` method 
convention, and then the generic function for pushing an item to a collection 
would look for `__push__`, `push`, `append`, or `add` and try the first of 
those that it finds on an object of a type that is not registered.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ZYKWRN2YV5SQC67VQCJT7URYY3XBDIAA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to