Re: [Pythonsound-devel] omde.score patch [was (no subject)]
Status: Beta
Brought to you by:
mupuxeddu
|
From: Paul W. <sli...@ya...> - 2001-10-09 17:26:38
|
On Tue, Oct 09, 2001 at 06:35:41PM +0200, Maurizio Umberto Puxeddu wrote: > > BUG FIXED: F.end() added, to always return F.onset instead of F.duration > > (which is actually not duration but table length). > > Using F and I polymorphically would not have worked. > There was I reason for not to add the end() method... but I don't remember > what... If you remember, I'd be curious to hear. I can't think of any problems with F.end(). > The problem of the "duration" of tables was known to me. This is the > reason the attach() method and related code. But it's a temporary > workaround. Aha, I didn't make the connection. I was wondering what those were for! > > SUGGESTION: a shorter name for calculate_onset_min_max, et al, > > would be get_onset_min_max. > > calculate_ was there to remeber that it is not at accessor method but it > has to do some work. Could we use calc_ as a compromise? If you like. But why is it necessary for the programmer to remember that this method "has to do some work"? He/she is only interested in the return value. > > BUG FIXED: calculate_onset_min_max always returned None as minimum. > > > > BUG FIXED: calculate_begin_end always returned None as the start. > > Did you checked it? > min(None, everything) is always everything. It's like None is infinite and > this is the reason to use max2(). $ python Python 2.1 (#5, Oct 8 2001, 00:32:31) [GCC 2.96 20000731 (Red Hat Linux 7.0)] on linux2 Type "copyright", "credits" or "license" for more information. >>> min (None, 1) >>> print min (None, 1) None -- ................ paul winkler ................ custom calendars: http://www.calendargalaxy.com A member of ARMS: http://www.reacharms.com home page: http://www.slinkp.com |