[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I agree this is weird, but technically is not incorrect. For example, consider this: >>> def foo(f): ... return f ... >>> @x = foo File "", line 1 @x = foo ^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Evan
Change by Evan : -- nosy: +schmave ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Pierre Quentel
ot;", line 2 ^ SyntaxError: invalid syntax >>> Maybe an error message such as "cannot assign to decorator" would be more appropriate ? -- components: Parser messages: 406351 nosy: lys.nikolaou, pablogsal, quentel priority: normal severity: normal

Re: a strange SyntaxError

2007-12-10 Thread Peter Otten
John Machin wrote: As viewed with Google Groups, lines 40/41, 63/69, and 89 are indented 8 spaces more than they should be. When I save your file and try to run it, I get this: C:\junkcoolgenie.py File C:\junk\coolgenie.py, line 40 self.w = 520 ^ IndentationError: unexpected

Re: a strange SyntaxError

2007-12-10 Thread Vladimir Rusinov
self.numlines = self.config['numlines'] self.w = 520 self.h = 12*self.numfeeds*(self.numlines+1) why extra ident here? -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ --

a strange SyntaxError

2007-12-09 Thread CoolGenie
Hi! I'm trying to write a small adesklet that will read newsfeeds. Here's the code: # # # fparser.py # # P. Kaminski [EMAIL PROTECTED] # Time-stamp: ## import

Re: a strange SyntaxError

2007-12-09 Thread CoolGenie
OK, sorry, this was about indents. Stupid VIM! -- http://mail.python.org/mailman/listinfo/python-list

Re: a strange SyntaxError

2007-12-09 Thread John Machin
On Dec 10, 7:15 am, CoolGenie [EMAIL PROTECTED] wrote: Hi! I'm trying to write a small adesklet that will read newsfeeds. Here's the code: # # # fparser.py # # P. Kaminski [EMAIL PROTECTED] # Time-stamp:

Re: a strange SyntaxError

2007-12-09 Thread Steve Howell
--- CoolGenie [EMAIL PROTECTED] wrote: self.feed = self.config['feedsrc'] self.numfeeds = self.config['numfeeds'] self.numlines = self.config['numlines'] self.w = 520 self.h = 12*self.numfeeds*(self.numlines+1)

Re: a strange SyntaxError

2007-12-09 Thread Samuel
On Sun, 09 Dec 2007 12:35:46 -0800, CoolGenie wrote: OK, sorry, this was about indents. Stupid VIM! $ mkdir -p $HOME/.vim/ftplugin/ $ echo setlocal sw=4 setlocal ts=4 noremap buffer LocalLeaderpy o/**CRCR/Esc ~/.vim/ftplugin/python.vim $ echo syntax on set sw=2 set ts=2 set nu

Re: a strange SyntaxError

2007-12-09 Thread Steve Howell
--- CoolGenie [EMAIL PROTECTED] wrote: OK, sorry, this was about indents. Stupid VIM! No prob. Add something like this (untested) to your ~/.vimrc: set expandtab set sw=4 set ts=4 Looking for

Re: a strange SyntaxError

2007-12-09 Thread Steve Howell
--- CoolGenie [EMAIL PROTECTED] wrote: OK, sorry, this was about indents. Stupid VIM! One more piece of VIM advice. You can use set list to show where tabs are. I prefer to convert my own tabs to spaces automatically, but you inevitably come across code that you don't own where it's nice to

Re: strange SyntaxError

2005-02-26 Thread Scott David Daniels
Attila Szabo wrote: 2005, Feb 25 - Scott David Daniels wrote : Attila Szabo wrote: ...lambda x: 'ABC%s' % str(x) ... OK, to no real effect, in main you define an unnamed function that you can never reference. Pretty silly, but I'll bite. This code was simplified, the lambda was part of a

Re: strange SyntaxError

2005-02-25 Thread Scott David Daniels
Attila Szabo wrote: Hi, def main(): lambda x: 'ABC%s' % str(x) for k in range(2): exec('print %s' % k) OK, to no real effect, in main you define an unnamed function that you can never reference. Pretty silly, but I'll bite. Next you run run a loop with exec looking like you think

Re: strange SyntaxError

2005-02-25 Thread Terry Reedy
Attila Szabo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I wrote this sample piece of code: def main(): lambda x: 'ABC%s' % str(x) for k in range(2): exec('print %s' % k) main() With the lambda line, I get this: SyntaxError: unqualified exec is not

Re: strange SyntaxError

2005-02-25 Thread Attila Szabo
2005, Feb 25 - Scott David Daniels wrote : Attila Szabo wrote: Hi, def main(): lambda x: 'ABC%s' % str(x) for k in range(2): exec('print %s' % k) OK, to no real effect, in main you define an unnamed function that you can never reference. Pretty silly, but I'll bite. This