On Thu, 07 Jun 2012 17:39:54 -0400, Terry Reedy <tjre...@udel.edu> wrote: > On 6/7/2012 4:54 PM, Yury Selivanov wrote: > > > I think we'll add a 'format' method to the Signature, that will work > > like 'inspect.formatargspec'. 'Signature.__str__' will use it with > > default parameters/formatters. > > Great. If I don't like the default, I could customize. > > > I'm not sure how __repr__ should look like. Maybe default repr > > (object.__repr__) is good enough. > > __repr__ = __str__ is common.
I think you meant __str__ = __repr__. __repr__ is the more fundamental of the two, and if there is no __str__, it defaults to __repr__. IMO the __repr__ should make it clear that it is a signature object somehow. --David _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com