Can I have a class with property named "from"

Ethan Furman ethan at stoneleaf.us
Fri Jun 5 18:59:45 EDT 2020


On 06/05/2020 03:15 PM, MRAB wrote:
> On 2020-06-05 22:50, Ethan Furman wrote:

>> There is no workaround that allows a keyword to be used except as a keyword, other than making it a string.  When faced with this kind of situation myself I use a synonym, like "since", or a translation, like "desde".
>>
> The usual workaround is to append an underscore: 'from_'.

True, but ick.  ;-)  It's like a dangling preposition.

--
~Ethan~


More information about the Python-list mailing list