On 2010-11-14 17:37 , Gregory Ewing wrote:
Steven D'Aprano wrote:
It only becomes your problem if you have advised people that the right way to
use your module is with import *.
And if you're advising people to do that, it would be an
extremely good idea to give your functions different names
Steven D'Aprano wrote:
It
only becomes your problem if you have advised people that the right way
to use your module is with import *.
And if you're advising people to do that, it would be an
extremely good idea to give your functions different names
so that they don't conflict with the builti
On Sat, 13 Nov 2010 11:41:09 -0800, dmitrey wrote:
> hi all,
> I have the following problem:
> I have overloaded "max" function in my module (FuncDesigner); it works
> like following:
> if some data in arguments is of type "oofun" then my function works,
> elseware numpy.max() is used.
>
> Now th
On 11/13/2010 2:41 PM, dmitrey wrote:
hi all,
I have the following problem:
I have overloaded "max" function in my module (FuncDesigner); it works
like following:
if some data in arguments is of type "oofun" then my function works,
elseware numpy.max() is used.
Now the problem:
suppose someone w
On 13/11/2010 19:55, dmitrey wrote:
Well, I think I have found an appropriate solution.
Regards, D.
Hi Dmitrey,
Would you mind briefly describing your solution?
Thanks,
Ben
--
http://mail.python.org/mailman/listinfo/python-list
Well, I think I have found an appropriate solution.
Regards, D.
--
http://mail.python.org/mailman/listinfo/python-list
On May 23, 12:20 pm, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> As per my understanding, the bad part is that on every call of the method
> FetchData(), an import would be done.
>
> To not let that happen, I can put the import into __init__(). But when I put
> in there, I get a NameError saying
On May 23, 12:20 pm, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> As per my understanding, the bad part is that on every call of the method
> FetchData(), an import would be done.
>
> To not let that happen, I can put the import into __init__(). But when I put
> in there, I get a NameError saying
On May 23, 12:20 pm, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> As per my understanding, the bad part is that on every call of the method
> FetchData(), an import would be done.
>
> To not let that happen, I can put the import into __init__(). But when I put
> in there, I get a NameError saying
On May 23, 1:20 pm, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need a little help in understanding how Namespaces and scoping works with
> Classes/Functions in Python.
>
> Here's my code:
> class FetchData:
> def __init__(self, dataTypes=["foo", "bar", "spam"], archive=False):
>
>
On May 23, 1:20 pm, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need a little help in understanding how Namespaces and scoping works with
> Classes/Functions in Python.
>
> Here's my code:
> class FetchData:
> def __init__(self, dataTypes=["foo", "bar", "spam"], archive=False):
>
>
> def _gn(x):
> return x.upper()
>
> great_name = _gn
>
> class myclass:
> def mymethod(self, great_name=False):
> if great_name:
> return _gn('something')
> else:
> return 'something'
> >>> def great_name(x):
> ... return x.upper()
> ...
> >>
On Thu, 13 Apr 2006 22:59:52 +0200, Daniel Nogradi wrote:
> I would like to give the same name to a keyword argument of a class
> method as the name of a function, with the function and the class
> living in the same namespace and the class method using the
> aforementioned function.
That's a pr
Daniel Nogradi wrote:
> I would like to give the same name to a keyword argument of a class
> method as the name of a function, with the function and the class
> living in the same namespace and the class method using the
> aforementioned function. So far I've been unsuccesfully trying to go
> alon
Ooops, there was a typo in my previous mail:
> in the hope of the del statement only removing the local variable util
^
the above line should be:
in the hope of the del statement only removing the lo
15 matches
Mail list logo