Re: Re: Some questions/suggestions
Greg Ward <[email protected]> Tue, 3 Dec 2002 10:41:00 -0500
| Newsgroups | gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
[me] >Good point! The current behaviour assumes the programmer knows full >well what he's doing. It should probably raise an exception instead, >but that raises backwards incompatibility issues. Hmmm. [[email protected]] > Maybe I'm naive, but I don't see anyone sane accessing invalid identifiers > using the __dict__. The '-' to '_' conversion should stay, docutils seems > to use it. I agree an exception should be raised. Err, I should have said, "... raises the possibility of backwards incompatibility issues for users who really like to push the boundaries". However, you don't need to grub about in __dict__ to get odd-named attributes -- you can use getattr() and setattr(). Also, a truly strict check would not just ban "--foo!bar", it would also ban "--3-times", because Python identifiers cannot start with a digit. Combine that with the fact hat getattr(options, '3_times') isn't *that* ugly, and you can see my point. > >Good point. Again, I'd have to look hard and think hard before I could > >answer this one properly. > > > >Can you enumerate the problems you see with the current design? > > > > I'm not sure what you're asking for here. Are you referring to my 'I can > see some problems with the current implementation'? Yes, that's exactly what I was curious about. It's like you said you had a proof for this theorem but didn't have room to write it in the margin. ;-) Greg -- Greg Ward <[email protected]> http://www.gerg.ca/ Gee, I feel kind of LIGHT in the head now, knowing I can't make my satellite dish PAYMENTS! ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en