On 18/11/2013 01:41, Steven D'Aprano wrote:
On Sun, 17 Nov 2013 17:20:52 -0500, Roy Smith wrote:
In article ,
Tamer Higazi wrote:
I want the param which is a string to be converted, that I can fire
directly a method. Is it somehow possible in python, instead of writing
if else statements
On Sun, 17 Nov 2013 17:20:52 -0500, Roy Smith wrote:
> In article ,
> Tamer Higazi wrote:
>> I want the param which is a string to be converted, that I can fire
>> directly a method. Is it somehow possible in python, instead of writing
>> if else statements ???!
>
> I'm not sure why you'd want
On Sunday, November 17, 2013 4:23:11 PM UTC-6, Rick Johnson wrote:
> 2. Never start a function or method with a lowercase letter.
> Please read PEP8
Urm... let me correct that:
2. Never start a function or method with a UPPERCASE letter.
Initial uppercase should be reserved for class names only
On Sunday, November 17, 2013 3:46:16 PM UTC-6, Tamer Higazi wrote:
> class(object):
> def Fire(self,param)
> #possible ?!
> self.__param():
> def _DoSomething(self):
> print 'I did it!'
1. First off your class declaration is not valid -- it needs
an identifier!
2.
In article ,
Tamer Higazi wrote:
> Hi people!
>
> Assume we have 2 methods, one called Fire and the other __DoSomething.
>
> I want the param which is a string to be converted, that I can fire
> directly a method. Is it somehow possible in python, instead of writing
> if else statements ???!
>
On Sun, Nov 17, 2013 at 2:46 PM, Tamer Higazi wrote:
> Hi people!
>
> Assume we have 2 methods, one called Fire and the other __DoSomething.
>
> I want the param which is a string to be converted, that I can fire
> directly a method. Is it somehow possible in python, instead of writing
> if else s
Hi people!
Assume we have 2 methods, one called Fire and the other __DoSomething.
I want the param which is a string to be converted, that I can fire
directly a method. Is it somehow possible in python, instead of writing
if else statements ???!
Tamer
class(object):
def Fire(self,param)