[New-bugs-announce] [issue22031] Hexadecimal id in reprs

Serhiy Storchaka report at bugs.python.org
Tue Jul 22 10:50:42 CEST 2014


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 <report at bugs.python.org>
<http://bugs.python.org/issue22031>
_______________________________________


More information about the New-bugs-announce mailing list