Testing for presence of arguments

Madhusudan Singh spammers-go-here at spam.invalid
Wed Aug 17 19:56:28 CEST 2005

Diez B. Roggisch wrote:

> I still don't see why default arguments like None won't do the trick.
> If The argument _can_
> be some value (let's say an int) or None, you still could go for a
> default value like () or any other value
> from a different domain.

"None" works perfectly. Someone else on the thread suggested it. I did not
know about the special intrinsic.

>> Unrelated question, how does one call a fortran 95 subroutine from python
>> ? I need really high speed of execution for that call (needed for each
>> measurement point, and is used to calculate some parameters for the
>> excitation for the next measurement point) and a scripting language would
>> not cut it.
> Didn't ever try that, but either do it in C, or if fortran code can be
> exposed as C lib, use that (ctypes is your friend). I'm not aware of a
> fortran binding - but I never tried to find one. Basically Python can
> interface with everything that can behave like C - which is the least
> common denominator I think, so there should be some way.

Hmm. Thanks for the pointers here.

More information about the Python-list mailing list