Re: [Python-Dev] Unbinding of methods

2012-07-19 Thread M Stefan
On 7/19/2012 9:54 PM, Antoine Pitrou wrote: On Thu, 19 Jul 2012 19:53:27 +0300 M Stefan wrote: Hey, As part of pickle4, I found it interesting to add the possibility of pickling bound functions (instance methods). This is done by pickling f.__self__ and f.__func__ separately, and then adding

[Python-Dev] Unbinding of methods

2012-07-19 Thread M Stefan
Hey, As part of pickle4, I found it interesting to add the possibility of pickling bound functions (instance methods). This is done by pickling f.__self__ and f.__func__ separately, and then adding a BIND opcode to tie them together. While this appears to work fine for python methods (non-builti

Re: [Python-Dev] PEP 0424: A method for exposing a length hint

2012-07-16 Thread M Stefan
On 7/16/2012 9:54 AM, Stefan Behnel wrote: Mark Shannon, 15.07.2012 16:14: Alex Gaynor wrote: CPython currently defines an ``__length_hint__`` method on several types, such as various iterators. This method is then used by various other functions (such as ``map``) to presize lists based on the

[Python-Dev] On a new version of pickle [PEP 3154]: self-referential frozensets

2012-06-23 Thread M Stefan
Hello, I'm one of this year's Google Summer of Code students working on improving pickle by creating a new version. My name is Stefan and my mentor is Alexandre Vassalotti. If you're interested, you can monitor the progress in the dedicated blog at [2] and the bitbucket repository at [3]. One o