softpano / pythonizer

Translator (or more correctly transcriber) from Perl to Python
http://www.softpanorama.org/Scripting/Pythonorama/Python_for_perl_programmers/Pythonizer/index.shtml
Other
39 stars 17 forks source link

-bareword not handled #88

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

-bareword is not handled. From the documentation: Unary "-" performs arithmetic negation if the operand is numeric, including any string that looks like a number. If the operand is an identifier, a string consisting of a minus sign concatenated with the identifier is returned. Otherwise, if the string starts with a plus or minus, a string starting with the opposite sign is returned. One effect of these rules is that -bareword is equivalent to the string "-bareword"

snoopyjc commented 2 years ago

Implemented in https://github.com/snoopyjc/pythonizer v0.920