Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
On Wed, Sep 15, 2010 at 10:51 AM, Benjamin Peterson
<rep...@bugs.python.org>wrote:
> I'm not sure if this pickling stuff matters as long as they both pickle.
>
I'm not sure either. Do other Python implementations try to maintain a
compatible pickle format with CPython? If so, I think CPython's C and
Python versions should also pickle to the same format.
> Yes, all the code expects an AttributeError on name is it's not
> present. For example, FileIO only sets its name attribute if it is
> passed a filename and not an fd.
>
Actually, FileIO sets the name attribute to the file descriptor if it isn't
passed a name:
1
----------
Added file: http://bugs.python.org/file18890/unnamed
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9858>
_______________________________________
<div class="gmail_quote">On Wed, Sep 15, 2010 at 10:51 AM, Benjamin Peterson
<span dir="ltr"><<a
href="mailto:rep...@bugs.python.org">rep...@bugs.python.org</a>></span>
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm not sure if this pickling stuff matters as long as they both
pickle.<br></blockquote><div><br>I'm not sure either. Do other Python
implementations try to maintain a compatible pickle format with CPython? If
so, I think CPython's C and Python versions should also pickle to the same
format.<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Yes, all the code expects an AttributeError on name is it's not<br>
present. For example, FileIO only sets its name attribute if it is<br>
passed a filename and not an fd.<br></blockquote><div><br>Actually, FileIO sets
the name attribute to the file descriptor if it isn't passed a
name:<br><br>>>> f = io.FileIO(1)<br>>>> <a
href="http://f.name">f.name</a><br>
1<br></div></div>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com