News for hackers. Stuff that matters.
Re:What Pythonistas Think of Ruby by algorias on Wednesday February 03, 2010 @11:49AM (#1098142)
> Thanks, checking out PEP 3107 now. I've always seen annotations done with the @annotation syntax like the Python 2 snippet has.

The @ syntax is for decorators. Different beast altogether.

Re:What Pythonistas Think of Ruby by steveklabnik on Wednesday February 03, 2010 @01:20PM (#1098417)
Ah. So, Python uses the Java annotation syntax for decorators? Hm. One more thing I'll have to look into when I get the time.
Re:What Pythonistas Think of Ruby by rbanffy on Wednesday February 03, 2010 @02:47PM (#1098643)
Actually, I think Java uses Python decoration syntax for annotations, but I have been wrong before.
Re:What Pythonistas Think of Ruby by pmiller2 on Wednesday February 03, 2010 @06:45PM (#1099281)
I'm pretty sure Python picked it up after Java did. But, I don't think it's a case of imitation; it's just that the glyph '@' happened not to have syntactic meaning attached to it and it looks okay.
Re:What Pythonistas Think of Ruby by blasdel on Wednesday February 03, 2010 @05:08PM (#1099028)
No, they're exactly the same beast!

I've used decorators to add attributes to function objects in several projects in the past -- you don't have to wrap the original.