[Python-ideas] Repr of lambda
Eric Fahlgren
ericfahlgren at gmail.com
Thu Dec 21 17:23:59 EST 2017
More information about the Python-ideas mailing list
Thu Dec 21 17:23:59 EST 2017
- Previous message (by thread): [Python-ideas] Repr of lambda
- Next message (by thread): [Python-ideas] Repr of lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could we call it "help"? Maybe add some beef to what's already there... >>> help(lambda x,y,*args: x) Help on function <lambda> in module __main__: <lambda> lambda x, y, *args On Thu, Dec 21, 2017 at 12:34 PM, Barry <barry at barrys-emacs.org> wrote: > > > > On 21 Dec 2017, at 06:57, Chris Barker <chris.barker at noaa.gov> wrote: > > > > in theory, the "goal" is for eval(repr(obj)) to return an equivelent > object > > Is that really was the goal of repr? If true then we would not need pickle. > > I have always assumed that repr of simple things aims to represent them > in just the way you would write them in python code. Repr of complex things > represents the obj as a useful summary. > > Lamba seems to be in the complex end of things. > > In debug logs I am often very interested in object identity and use the > 0x123 as one way to know. Removing the unique id would be a regression > in my eyes. > > Maybe what you would like to have is an explain function that given any > object tells you alll about it. help function does some of this I guess. > > Barry > > _______________________________________________ > Python-ideas mailing list > Python-ideas at python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171221/baa15156/attachment.html>
- Previous message (by thread): [Python-ideas] Repr of lambda
- Next message (by thread): [Python-ideas] Repr of lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list