Peter Maas wrote:
>> Thanks for the suggestion, but seems needlessly complicated for
> > something very simple.
>
> What is "very simple"? The problem or the solution? :) If you examine
The form of the solution.
> this suggestion more closely you will note that it is more or less
> the same as
Madhusudan Singh schrieb:
> Dan Sommers wrote:
[...]
>>class _SemiPrivateClass:
>>pass
>>
>>def f(required_argument=_SemiPrivateClass):
>>if required_argument == _SemiPrivateClass:
>>print "required_argument was probably not present"
>>else:
>>
Madhusudan Singh wrote:
> 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 scri
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 o
> I am writing some code for a measurement application (would have used
> fortran 95 if a library had been available for linux-gpib, but python is a
> lot friendlier than C without the irritating and utterly pointless braces)
> where one of the input parameters for the GPIB command is optional, and
Peter Decker wrote:
> On 8/17/05, Madhusudan Singh <[EMAIL PROTECTED]> wrote:
>
>> I know how to set optional arguments in the function definition. Is there
>> an intrinsic function that determines if a certain argument was actually
>> passed ? Like the fortran 95 present() logical intrinsic ?
>>
Dan Sommers wrote:
> On Wed, 17 Aug 2005 11:13:03 -0400,
> Madhusudan Singh <[EMAIL PROTECTED]> wrote:
>
>> I know how to set optional arguments in the function definition. Is
>> there an intrinsic function that determines if a certain argument was
>> actually passed ? Like the fortran 95 present
Benji York wrote:
> Madhusudan Singh wrote:
>> I know how to set optional arguments in the function definition. Is there
>> an intrinsic function that determines if a certain argument was actually
>> passed ? Like the fortran 95 present() logical intrinsic ?
>
> People generally use a value that
Diez B. Roggisch wrote:
> I don't have the details ready - but in the ASPN cookbook are recipes
> to e.g. figure insied a function f out how many results the caller of f
> expects - and act accordingly. This boils down to inspect the
> call-stack. So it ceratinly is possible.
>
> However, I'd say
I don't have the details ready - but in the ASPN cookbook are recipes
to e.g. figure insied a function f out how many results the caller of f
expects - and act accordingly. This boils down to inspect the
call-stack. So it ceratinly is possible.
However, I'd say it is almost 100% a design flaw. Or
Madhusudan Singh wrote:
> I know how to set optional arguments in the function definition. Is there an
> intrinsic function that determines if a certain argument was actually
> passed ? Like the fortran 95 present() logical intrinsic ?
People generally use a value that isn't a valid option, often
On Wed, 17 Aug 2005 11:13:03 -0400,
Madhusudan Singh <[EMAIL PROTECTED]> wrote:
> I know how to set optional arguments in the function definition. Is
> there an intrinsic function that determines if a certain argument was
> actually passed ? Like the fortran 95 present() logical intrinsic ?
d
On 8/17/05, Madhusudan Singh <[EMAIL PROTECTED]> wrote:
> I know how to set optional arguments in the function definition. Is there an
> intrinsic function that determines if a certain argument was actually
> passed ? Like the fortran 95 present() logical intrinsic ?
>
> My required functionality
13 matches
Mail list logo