[issue31194] Inconsistent __repr__s for _collections objects

2017-08-15 Thread R. David Murray

R. David Murray added the comment:

This is a duplicate of issue 27541.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Repr of collection's subclasses

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-15 Thread Vedran Čačić

Vedran Čačić added the comment:

More and more, Python looks to me like a certain language that I thought I had 
left behind a long time ago.

   [...] Each  operator  decides  which sort of scalar it
   would be  most  appropriate  to  return.   
   [...] In  general, they do what you want,
   unless you want consistency.

Maybe it's just a sign of growing up. :-)

--
nosy: +veky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-14 Thread Raymond Hettinger

Raymond Hettinger added the comment:

IIRC, deque() did this to better match the behavior of list().  Not everything 
in Python is consistent and sometimes we have to pick and choose between what 
we want to be consistent with.  For the most part, the decisions have worked 
out well in practice (deque.__repr__ hasn't seemed to bother anyone in its 
dozen year history).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-14 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
priority: normal -> low
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-13 Thread Dan Snider

New submission from Dan Snider:

With the new C implementation of collections.OrderedDict, its repr correctly 
uses the subclass's name, unlike deque and defaultdict.

class Thing(_collections.OrderedDict):
pass
>>> Thing()
Thing([])

class Thing(_collections.deque):
pass
>>> Thing()
deque([])

--
components: Library (Lib)
messages: 300222
nosy: bup
priority: normal
severity: normal
status: open
title: Inconsistent __repr__s for _collections objects
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com