[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: My understanding of the current code is that in the example above, f.__name__ would be "". 1. I believe this would make the representation < at 0x> unless functions gain a custom __repr__ method that strips the brackets off the name when present.

[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: OK, if it gets truncated beyond a reasonable length I remove my objection. -- ___ Python tracker ___

[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-05 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: +0 This would help with debugging and would compensate for the lack of a docstring. FWIW, I've found the new longer repr's for regex match objects to be helpful, and this would be another step in the right direction. Terry's suggestion to truncate a

[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: However, this is a compatibility liability. People routinely use various formatting options to truncate long strings, since experience shows those are common. But few people expect the repr() of a function/lambda object to be unwieldy. --

[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: People write also long strings, lists, dicts, but they are not truncated. In contrary to the above types which usually are created programmically and can be very large, lambdas are written manually and rarely exceed the size of a single line. We should

[issue34856] Make the repr of lambda contain signature and body expression.

2018-10-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Make the repr of lambda containing the signature and body expression. -> Make the repr of lambda contain signature and body expression. ___ Python tracker