[Tutor] Don't understand this class/constructor call syntax

Alan Gauld alan.gauld at btinternet.com
Sat Jul 23 01:14:18 CEST 2011


dave wrote:

> My only remaining question is the pad_for_usrp argument.  The default value is
> True so I thought it was a boolean and couldn't have anything to do with the
> "self<transmit_path>" that was passed to it.  However, I can probably puzzle
> that out by looking at how it's used in the code.  

I thought that was weird too and my first thought was that it was a bug.
The I thought that maybe it was using the fact that an object in Python 
normally evaluates to True so maybe the code tests for True and if True 
tries to determine the type and perform some operation.

If that's what its doing I don't like it and think it's a bad design but 
it is feasible.

OTOH it may still just be a bug! :-)

Alan G





More information about the Tutor mailing list