On Sat, 15 Apr 2000, Vladimir Marangozov wrote: > Greg Stein wrote: > > > > Your views on what an object model should be are not Python's views. > > Ehm, could you explain to me what are Python's views? > Sorry, I don't see any worthy argument in your posts > that would make me switch from -1 to -0. "We're all adults here." Python says that you can do what you want. It won't get in your way. Badness is not defined. If somebody wants to write "a.author='Guido'" then they can. There are a number of objects that can have arbitrary attributes. Classes, modules, and instances are a few (others?). Function objects are a proposed additional one. In all cases, attaching new attributes is fine and dandy -- no restriction. (well, you can implement __setattr__ on a class instance) Python's object model specifies a number of other behaviors, but nothing really material here. Of course, all these "views" are simply based on Guido's thoughts and the implementation. Implementation, doc, current practice, and Guido's discussions over the past eight years of Python's existence have also contributed to the notion of "The Python Way". Some of that may be very hard to write down, although I've attempted to write a bit of that above. After five years of working with Python, I'd like to think that I've absorbed and understand the Python Way. Can I state it? No. "We're all adults here" is a good one for this discussion. If you think that function attributes are bad for your programs, then don't use them. There are many others who find them tremendously handy. Cheers, -g -- Greg Stein, http://www.lyra.org/
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