Expose `six.moves` API for writing custom moves
Bug #653383 reported by
Sridhar Ratnakumar
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Six |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I added a xmlrpclib move without changing the six source code like this:
>>> import six.moves
>>> from six._moves import _Module, MovedItems
>>> m = _Module(
>>> setattr(MovedItems, m.name, m)
>>> six.moves.
<module 'xmlrpclib' from 'C:\Python27\
I am not fully confident as to using these internal names (that start with underscore). Wouldn't it be helpful to expose this as a supported API so others could build on top of six.moves?
Changed in python-six: | |
status: | Fix Committed → Fix Released |
status: | Fix Released → Fix Committed |
Changed in python-six: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I think a better idea would be to add names which are missing. :) six tries to have a pretty minimalistic API, and I don't want to cloud it with non-Python2/3 related things.