Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in cStringIO #52368

Closed
jmfauth mannequin opened this issue Mar 12, 2010 · 3 comments
Closed

Typo in cStringIO #52368

jmfauth mannequin opened this issue Mar 12, 2010 · 3 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@jmfauth
Copy link
Mannequin

jmfauth mannequin commented Mar 12, 2010

BPO 8121
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2010-03-12.10:18:42.875>
created_at = <Date 2010-03-12.10:14:44.645>
labels = ['type-bug', 'invalid']
title = 'Typo in cStringIO'
updated_at = <Date 2010-03-12.11:00:20.649>
user = 'https://bugs.python.org/jmfauth'

bugs.python.org fields:

activity = <Date 2010-03-12.11:00:20.649>
actor = 'jmfauth'
assignee = 'none'
closed = True
closed_date = <Date 2010-03-12.10:18:42.875>
closer = 'georg.brandl'
components = ['None']
creation = <Date 2010-03-12.10:14:44.645>
creator = 'jmfauth'
dependencies = []
files = []
hgrepos = []
issue_num = 8121
keywords = []
message_count = 3.0
messages = ['100920', '100921', '100927']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'jmfauth']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue8121'
versions = ['Python 2.6']

@jmfauth
Copy link
Mannequin Author

jmfauth mannequin commented Mar 12, 2010

There is a malformed string in the module cStringIO.

StringI <--> StringIO

>>> sys.version
2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
>>> StringIO.StringIO('123')
<StringIO.StringIO instance at 0x02D230D0>
>>> cStringIO.StringIO('123')
<cStringIO.StringI object at 0x0183ECB0>
>>>

@jmfauth jmfauth mannequin added the type-bug An unexpected behavior, bug, or error label Mar 12, 2010
@birkenfeld
Copy link
Member

That name is actually correct. cStringIO features two different types, depending on whether you call cStringIO.StringIO() with or without an argument. One is called "StringI", the other "StringO".

@jmfauth
Copy link
Mannequin Author

jmfauth mannequin commented Mar 12, 2010

Wow! I never been aware of this (documentation, dir(), __doc__)
Indeed:

>>> cStringIO.StringIO()
<cStringIO.StringO object at 0x02D94F40>
>>> cStringIO.StringIO('abc')
<cStringIO.StringI object at 0x016DE920>

Sorry for the noise.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant