>>>>> "SM" == Skip Montanaro <skip@mojam.com> writes: BAW> Functions and methods are first class objects, and they BAW> already have attributes, some of which are writable. SM> (Trying to read Fredrik's mind...) SM> By extension, we should allow writable attributes to work for SM> other objects. To pollute this discussion with an example SM> from another one: | i = 3.1416 | i.__precision__ = 4 SM> I haven't actually got anything against adding attributes to SM> functions (or numbers, if it's appropriate). Just wondering SM> out loud and playing a bit of a devil's advocate. Python 1.6a2 (#26, Apr 12 2000, 13:53:57) [GCC 2.8.1] on sunos5 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> i = 3.1416 >>> dir(i) [] Floats don't currently have attributes. -Barry
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