New submission from Serhiy Storchaka:

Default repr of an instance looks as:

>>> object()
<object object at 0xb71a14a8>

Many specialized reprs follow a pattern <... at {hexadecimal id}...>. But there 
are few deviations:

1. Reprs of WeakValueDictionary and WeakKeyDictionary in the weakref module 
output decimal id.

2. reprlib and reprs of CDLL in the ctypes module and DateTime and MultiCall in 
the xmlrpc.client module output hexadecimal id but without the "0x" prefix.

Proposed patch makes these cases to conform with other reprs.

----------
components: Library (Lib)
files: repr_hex_id.diff
keywords: patch
messages: 223647
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Hexadecimal id in reprs
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file36025/repr_hex_id.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22031>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to