bambam a écrit :
> "Bruno Desthuilliers" <[EMAIL PROTECTED]>
> wrote in message news:[EMAIL PROTECTED]
>> As a side note, in Python, inheritance ...
>> ... should usually not be used for typing.
>
> :~(
> I'm sorry, I don't even know what that means... The code I
> have inherited from someone onl
On 2007-08-31, bambam <[EMAIL PROTECTED]> wrote:
> "Bruno Desthuilliers"
> <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
>> As a side note, in Python, inheritance ... ... should usually
>> not be used for typing.
>
>:~(
> I'm sorry, I don't even know what that means... The code I ha
"Bruno Desthuilliers" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
>
> As a side note, in Python, inheritance ...
> ... should usually not be used for typing.
:~(
I'm sorry, I don't even know what that means... The code I
have inherited from someone only a little more knowledgeabl
Thank you.
I'm glad to see that I don't need to choose between two
opposing viewpoints :~)
Steve.
--
http://mail.python.org/mailman/listinfo/python-list
bambam a écrit :
Steve, could you please stop top-posting ?-) TIA
> "Dan Bishop" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> On Aug 23, 10:21 pm, "bambam" <[EMAIL PROTECTED]> wrote:
>>> Would someone like to suggest a replacement for this? This is a
>>> function that return
bambam wrote:
[but he top-posted]
> "Dan Bishop" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> On Aug 23, 10:21 pm, "bambam" <[EMAIL PROTECTED]> wrote:
>>> Would someone like to suggest a replacement for this? This is a
>>> function that returns different kinds of similar object
Thank you. I didn't reply earlier because I was trying to get my
head around what you wrote, which was strange and foreign
to me.
It seems to me that the dictionary object you suggested is a
direct replacement for the function code, only more efficient
because the case table is internalised with a
bambam a écrit :
>> trying to be "idiomatic"
>
> ...I hope that if a python programmer looks at my code it
> won't be an excuse to discard it.
Hopefully not - and nothing forces you into adopting the common
convention !-) But it's a fact that Python relies heavily on naming
conventions, and th
> trying to be "idiomatic"
...I hope that if a python programmer looks at my code it
won't be an excuse to discard it. Less of an issue with Python
than with C/C++, but since I'm just starting...
def device(DeviceType):
if DeviceType=='PSP':
return Psp()
elif DeviceType=="Power Su
Bruno Desthuilliers a écrit :
(snip)
> and ALL_LOWER
That's 'ALL_UPPER', of course :(
> for symbolic (pseudo)
> constants.
>
--
http://mail.python.org/mailman/listinfo/python-list
bambam a écrit :
> Would someone like to suggest a replacement for this? This is a
> function that returns different kinds of similar objects, depending
> on what is asked for. PSP and PWR are classes. I don't really
> want to re-write the calling code very much: I'm just wondering
> if the functi
On Aug 23, 10:21 pm, "bambam" <[EMAIL PROTECTED]> wrote:
> Would someone like to suggest a replacement for this? This is a
> function that returns different kinds of similar objects, depending
> on what is asked for. PSP and PWR are classes. I don't really
> want to re-write the calling code very
Would someone like to suggest a replacement for this? This is a
function that returns different kinds of similar objects, depending
on what is asked for. PSP and PWR are classes. I don't really
want to re-write the calling code very much: I'm just wondering
if the function can be replaced with som
13 matches
Mail list logo