Re: [Python-checkins] CVS: distutils/distutils cmd.py

[ damn... can't see the code... went and checked it out... ] On Sun, 9 Apr 2000, Greg Ward wrote:
Update of /projects/cvsroot/distutils/distutils In directory kaluha:/tmp/cvs-serv16575
Modified Files: cmd.py Log Message: Added a check for the 'force' attribute in '__getattr__()' -- better than crashing when self.force not defined.
This seems a bit silly. Why don't you simply define .force in the __init__ method? Better yet: make the other guys crash -- the logic is bad if they are using something that isn't supposed to be defined on that particular Command object. Cheers, -g -- Greg Stein, http://www.lyra.org/

On 10 April 2000, Greg Stein said:
On Sun, 9 Apr 2000, Greg Ward wrote:
Modified Files: cmd.py Log Message: Added a check for the 'force' attribute in '__getattr__()' -- better than crashing when self.force not defined.
This seems a bit silly. Why don't you simply define .force in the __init__ method?
Duhh, 'cause I'm stupid? No, that's not it. 'Cause I was doing this on a lazy Sunday evening and not really thinking about it? Yeah, I think that's it. There, I now define self.force in the Command class constructor. A wee bit cheesy (not all Distutils command classes need or use self.force, and it wouldn't always mean the same thing), but it means minimal code upheaval for now.
[ damn... can't see the code... went and checked it out... ]
Oops, that was a CVS config thing. Fixed now -- I'll go checkin that change and we'll all see if it worked. Just as well it was off though -- I checked in a couple of big documentation updates this weekend, and who wants to see 30k of LaTeX patches in their inbox on Monday morning? ;-) Greg -- Greg Ward - software developer gward@mems-exchange.org MEMS Exchange / CNRI voice: +1-703-262-5376 Reston, Virginia, USA fax: +1-703-262-5367

On Mon, 10 Apr 2000, Greg Ward wrote:
On 10 April 2000, Greg Stein said: ...
[ damn... can't see the code... went and checked it out... ]
Oops, that was a CVS config thing. Fixed now -- I'll go checkin that change and we'll all see if it worked. Just as well it was off though -- I checked in a couple of big documentation updates this weekend, and who wants to see 30k of LaTeX patches in their inbox on Monday morning? ;-)
Cool. The CVS diffs appear to work quite fine now! Note: you might not get a 30k patch since the system elides giant diffs. Of course, if you patch 10 files, each with 3k diffs... :-) Cheers, -g -- Greg Stein, http://www.lyra.org/
participants (2)
-
Greg Stein
-
Greg Ward