Eric Snow added the comment:

Right now say you have 2 module specs that are the same.  The only difference 
is that the 2 loaders are not the same instance (they were created separately 
with the same arguments, ergo equal).  The two specs will not compare as equal 
even though they are equal.

I expect users will find it surprising if they compare module.__spec__ to 
another spec that is basically the same (as described above) and it resolve to 
not equal.  I can see this as particularly vexing for importer writers that are 
switching over to the new spec-based APIs.

In my mind, the benefit of removing that unexpected (and aggravating) behavior 
outweighs the risk that someone is depending on identity-only comparision for 
the two loader types that are impacted by this change (which were both just 
added in 3.3).

----------

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

Reply via email to