This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients alexandre.vassalotti, fdrake, serhiy.storchaka, vstinner
Date 2016-01-25.20:53:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The range() object is immutable, but is not atomic, and copy.deepcopy() shouldn't return it unchanged.

>>> class I(int): pass  # mutable index
>>> import copy
>>> r = range(I(10))
>>> r2 = copy.deepcopy(r)
>>> r.stop.attr = 'spam'
>>> r2.stop.attr

This is Python 3 only issue because in 2.7 the xrange() object doesn't exposes start/stop/step attributes.

Proposed patch fixes the copy module.
Date User Action Args
2016-01-25 20:53:06serhiy.storchakasetrecipients: + serhiy.storchaka, fdrake, vstinner, alexandre.vassalotti
2016-01-25 20:53:06serhiy.storchakasetmessageid: <>
2016-01-25 20:53:06serhiy.storchakalinkissue26202 messages
2016-01-25 20:53:06serhiy.storchakacreate