[ python-Bugs-1416477 ] Inconsistency between StringIO and cStringIO

2006-03-18 Thread SourceForge.net
Bugs item #1416477, was opened at 2006-01-27 14:51
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Closed
Resolution: Out of Date
Priority: 5
Submitted By: Michael Kerrin (mkerrin)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Inconsistency between StringIO and cStringIO

Initial Comment:
The readline method for StringIO defalt argument for
the size arguement is None while for all other
file-like objects it is -1. So if we pass in -1 to the
StringIO readline method, all lines are returned, again
inconsistent with the other file-like objects, and if
we pass in None to any other file-like object we get a
TypeError, int required.

The attached python script is a very simple example of
what I mean.

Note that this is causing me a lot of grief in trying
to get tests to pass for a simple fix to an open source
project.

--

Comment By: Georg Brandl (gbrandl)
Date: 2006-03-18 08:24

Message:
Logged In: YES 
user_id=849994

Closing then.

--

Comment By: Kent Hsu (cphsu)
Date: 2006-03-06 05:16

Message:
Logged In: YES 
user_id=1468643

Sorry, it seems the bug has been fixed in 2.4.


 import cStringIO as c
 sio = c.StringIO()
 sio.write(a)
 sio.truncate(0)
 print sio.getvalue()

 sio.write(b)
 print sio.getvalue()
ab

which I get in StringIO module is b.

--

Comment By: Kent Hsu (cphsu)
Date: 2006-03-06 05:04

Message:
Logged In: YES 
user_id=1468643

BTW, another inconsistency between StringIO and cStringIO :-)

 import cStringIO as c
 sio = c.StringIO()
 sio.write(a)
 sio.truncate(0)
 print sio.getvalue()

 sio.write(b)
 print sio.getvalue()
ab

which I get in StringIO module is b.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1416477 ] Inconsistency between StringIO and cStringIO

2006-03-05 Thread SourceForge.net
Bugs item #1416477, was opened at 2006-01-27 22:51
Message generated for change (Comment added) made by cphsu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Kerrin (mkerrin)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Inconsistency between StringIO and cStringIO

Initial Comment:
The readline method for StringIO defalt argument for
the size arguement is None while for all other
file-like objects it is -1. So if we pass in -1 to the
StringIO readline method, all lines are returned, again
inconsistent with the other file-like objects, and if
we pass in None to any other file-like object we get a
TypeError, int required.

The attached python script is a very simple example of
what I mean.

Note that this is causing me a lot of grief in trying
to get tests to pass for a simple fix to an open source
project.

--

Comment By: Kent Hsu (cphsu)
Date: 2006-03-06 13:04

Message:
Logged In: YES 
user_id=1468643

BTW, another inconsistency between StringIO and cStringIO :-)

 import cStringIO as c
 sio = c.StringIO()
 sio.write(a)
 sio.truncate(0)
 print sio.getvalue()

 sio.write(b)
 print sio.getvalue()
ab

which I get in StringIO module is b.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1416477 ] Inconsistency between StringIO and cStringIO

2006-03-05 Thread SourceForge.net
Bugs item #1416477, was opened at 2006-01-27 22:51
Message generated for change (Comment added) made by cphsu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Kerrin (mkerrin)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Inconsistency between StringIO and cStringIO

Initial Comment:
The readline method for StringIO defalt argument for
the size arguement is None while for all other
file-like objects it is -1. So if we pass in -1 to the
StringIO readline method, all lines are returned, again
inconsistent with the other file-like objects, and if
we pass in None to any other file-like object we get a
TypeError, int required.

The attached python script is a very simple example of
what I mean.

Note that this is causing me a lot of grief in trying
to get tests to pass for a simple fix to an open source
project.

--

Comment By: Kent Hsu (cphsu)
Date: 2006-03-06 13:16

Message:
Logged In: YES 
user_id=1468643

Sorry, it seems the bug has been fixed in 2.4.


 import cStringIO as c
 sio = c.StringIO()
 sio.write(a)
 sio.truncate(0)
 print sio.getvalue()

 sio.write(b)
 print sio.getvalue()
ab

which I get in StringIO module is b.

--

Comment By: Kent Hsu (cphsu)
Date: 2006-03-06 13:04

Message:
Logged In: YES 
user_id=1468643

BTW, another inconsistency between StringIO and cStringIO :-)

 import cStringIO as c
 sio = c.StringIO()
 sio.write(a)
 sio.truncate(0)
 print sio.getvalue()

 sio.write(b)
 print sio.getvalue()
ab

which I get in StringIO module is b.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1416477 ] Inconsistency between StringIO and cStringIO

2006-01-27 Thread SourceForge.net
Bugs item #1416477, was opened at 2006-01-27 14:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Kerrin (mkerrin)
Assigned to: Nobody/Anonymous (nobody)
Summary: Inconsistency between StringIO and cStringIO

Initial Comment:
The readline method for StringIO defalt argument for
the size arguement is None while for all other
file-like objects it is -1. So if we pass in -1 to the
StringIO readline method, all lines are returned, again
inconsistent with the other file-like objects, and if
we pass in None to any other file-like object we get a
TypeError, int required.

The attached python script is a very simple example of
what I mean.

Note that this is causing me a lot of grief in trying
to get tests to pass for a simple fix to an open source
project.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1416477 ] Inconsistency between StringIO and cStringIO

2006-01-27 Thread SourceForge.net
Bugs item #1416477, was opened at 2006-01-27 09:51
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Kerrin (mkerrin)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Inconsistency between StringIO and cStringIO

Initial Comment:
The readline method for StringIO defalt argument for
the size arguement is None while for all other
file-like objects it is -1. So if we pass in -1 to the
StringIO readline method, all lines are returned, again
inconsistent with the other file-like objects, and if
we pass in None to any other file-like object we get a
TypeError, int required.

The attached python script is a very simple example of
what I mean.

Note that this is causing me a lot of grief in trying
to get tests to pass for a simple fix to an open source
project.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=105470aid=1416477group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com