[New-bugs-announce] [issue40995] reprlib.Repr.__init__ should accept arguments

Rémi Lapeyre report at bugs.python.org
Tue Jun 16 19:00:12 EDT 2020


New submission from Rémi Lapeyre <remi.lapeyre at henki.fr>:

reprlib.Repr does not accept arguments for the moment so setting its attributes must be done in multiple steps:

import reprlib
r = reprlib.Repr()
r.maxstring = 10
r.maxset = 4
r.repr(...)


It would be more user-friendly to be able to do:

import reprlib
r = reprlib.Repr(maxstring=10, maxset=4)
r.repr(...)

----------
components: Library (Lib)
messages: 371701
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: reprlib.Repr.__init__ should accept arguments
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40995>
_______________________________________


More information about the New-bugs-announce mailing list