[New-bugs-announce] [issue21670] Add repr to shelve.Shelf

Claudiu.Popa report at bugs.python.org
Thu Jun 5 19:26:57 CEST 2014


New submission from Claudiu.Popa:

Hello!

Working with Shelf instances in the interactive console is cumbersome because you can't have an instant feedback when running the following:

>>> from shelve import Shelf
>>> s = Shelf({})
>>> s['a'] = 1
>>> s
<shelve.Shelf object at 0x033D0AF0>

This patch adds an useful repr to Shelf objects.

>>> s
Shelf({'a': 1})

Thanks!

----------
components: Library (Lib)
files: shelve.patch
keywords: patch
messages: 219827
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Add repr to shelve.Shelf
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35492/shelve.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21670>
_______________________________________


More information about the New-bugs-announce mailing list