I did not check the file, but this can be used to deal with tuples:

# declare a list of tuples
>>> t = [(1,),(2,)]

# obtain scalar values (first item of each tuple)
>>> for x, in t:
...   print x
...
1
2

# obtain tuples
>>> for x in t:
...   print x
...
(1,)
(2,)
>>>

The first form would be a shortcut for:

>>> for x in t:
...   print x[0]
...

It does not imply that the code in notification.py is valid, but the syntax is.

Cheers,
Manu

On 1/22/07, Rainer Sokoll <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> in notification.py
> (http://trac.edgewall.org/browser/tags/trac-0.10.3/trac/ticket/notification.py),
> I came across lines 234 and 239. I have no idea about python, but are
> the commas in "for updater, in cursor:" correct python syntax? I've
> never seen that in other languages.
>
> Rainer
>
> >
>


-- 
Manu

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to