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 Sergey
Recipients Ramchandra Apte, Sergey, aleax, ethan.furman, jcea, oscarbenjamin, serhiy.storchaka, terry.reedy
Date 2013-07-14.14:49:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373813351.62.0.267771053139.issue18305@psf.upfronthosting.co.za>
In-reply-to
Content
> I guess such implementation of tuple will increase memory usage
> and creation time which are critical important for tuples.

On the contrary, it will reduce memory usage and creation time compared to regular tuples, because in cases like:
  c = a + b
you do not have to spend time and memory for allocating and copying elements of "a".

The only case when it could use more memory is if you explicitly delete "c" after that operation. But this can be solved too, internal storage can be resized to a smaller value when its tail elements are not used any more.

This idea can be improved in many ways. For example it's possible to implement __add__ in C so that it would require no additional memory at all. But it is just a proof of concept, and I was trying to keep it simple, so the idea was easier to understand.
History
Date User Action Args
2013-07-14 14:49:11Sergeysetrecipients: + Sergey, aleax, terry.reedy, jcea, ethan.furman, Ramchandra Apte, serhiy.storchaka, oscarbenjamin
2013-07-14 14:49:11Sergeysetmessageid: <1373813351.62.0.267771053139.issue18305@psf.upfronthosting.co.za>
2013-07-14 14:49:11Sergeylinkissue18305 messages
2013-07-14 14:49:11Sergeycreate