Emanuel Barry added the comment:

I would personally suggest a more permanent and accessible way, in the way the 
decimal module handles it. I'd add a '_pycollections' module holding the pure 
Python implementations of OrderedDict and _count_elements, then have the 
collections package import them if the C accelerators don't work.

While the '_pydecimal' module is not guaranteed to remain across versions, 
successfully importing it means that you are guaranteed to use the pure Python 
version of it. In the same direction, successfully importing OrderedDict from 
_pycollections would guarantee that you're using the pure Python version of it.

This would have the side-effect of allowing people relying on the pure Python 
implementation details to use them (see #25315).

----------
nosy: +ebarry

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

Reply via email to