>>>>> "BAW" == Barry A Warsaw <bwarsaw@cnri.reston.va.us> writes: BAW> Functions and methods are first class objects, and they already BAW> have attributes, some of which are writable. Why should BAW> __doc__ be special? Just because it was the first such BAW> attribute to have syntactic support for easily defining? I don't have a principled argument about why doc strings should be special, but I think that they should be. I think it's weird that you can change __doc__ at runtime; I would prefer that it be constant. BAW> Think about my proposal this way: it actually removes a BAW> restriction. I think this is really the crux of the matter! The proposal removes a useful restriction. The alternatives /F suggested seem clearer to me that sticking new attributes on functions and methods. Three things I like about the approach: It affords an opportunity to be very clear about how the attributes are intended to be used. I suspect it would be easier to describe with a static type system. It prevents confusion and errors that might result from unprincipled use of function attributes. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4