[Tutor] Variable name containing '-'

ramakrishna reddy rampappula at gmail.com
Fri Sep 1 16:48:06 EDT 2017


Hi there,

I am implementing a soap webservice where a method which has keyword
parameter(named:abc-xyz) needs to be used to call third party app.

eg: obj.method(abc-xyz=10)

As python does not support '-' in variable names, I am a bit confused.
I know in case of methods we can use getattr(self.object, 'method-name')()
can be used. But in case of variable how we can use ?

Thanks,
Ram.


More information about the Tutor mailing list