[issue21861] io class name are hardcoded in reprs

2022-01-23 Thread AN Long
Change by AN Long : -- nosy: +asaka nosy_count: 11.0 -> 12.0 pull_requests: +29011 pull_request: https://github.com/python/cpython/pull/30824 ___ Python tracker ___ ___

[issue21861] io class name are hardcoded in reprs

2019-08-08 Thread Philip Dye
Change by Philip Dye : -- nosy: +Philip Dye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue21861] io class name are hardcoded in reprs

2019-07-14 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +14567 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14774 ___ Python tracker ___

[issue21861] io class name are hardcoded in reprs

2019-05-16 Thread Windson Yang
Windson Yang added the comment: IIUC, in the c code we just hardcode the name "_io.FileIO" for "PyFileIO_Type" in https://github.com/python/cpython/blob/master/Modules/_io/fileio.c#L1180. If we want to get a dynamic name, we should replace the hardcode name with the module name (like "__main

[issue21861] io class name are hardcoded in reprs

2015-03-23 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue21861] io class name are hardcoded in reprs

2014-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I now see that this issue is not so easy from C side. And more, it is very uncommon for either Python or C implementations (especial C implementations) to introspect to figure out their "real" name. Existing cases are rather exceptions. And in many case this

[issue21861] io class name are hardcoded in reprs

2014-06-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Usually reprs of subclass instances substitute actual module > and class names. This is a sensible idea that makes life easier for people writing subclasses. +1 for your suggestion. -- nosy: +rhettinger ___ Pyt

[issue21861] io class name are hardcoded in reprs

2014-06-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: Is it common for C implementations to introspect to figure out their "real" name? I do this manually for reprs of my user defined classes, but I haven't noticed many built-ins that consider extensibility for the repr. Maybe I'm just not using the classes that

[issue21861] io class name are hardcoded in reprs

2014-06-30 Thread Claudiu Popa
Claudiu Popa added the comment: The same should be done for _pyio? -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list

[issue21861] io class name are hardcoded in reprs

2014-06-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> import io >>> class F(io.FileIO): pass ... >>> f = F('/dev/null', 'r') >>> f <_io.FileIO name='/dev/null' mode='rb'> >>> class B(io.BufferedReader): pass ... >>> b = B(f) >>> b >>> class T(io.TextIOBufferedReader): pass io.TextIOBase( io.TextIOWrap