help
Ian Kelly
ian.g.kelly at gmail.com
Wed Jan 30 17:08:57 EST 2013
On Wed, Jan 30, 2013 at 2:16 PM, <aramildaern at gmail.com> wrote:
> Hi everyone! I don't mean to intrude, but ive heard great things about this group and ive stumped myself with my python code.
>
> heres my code:
It would be helpful if you would also include the error that you get
when trying to run the code.
> global labelList
> labelList= dict()
>
> global counter
> counter = 0
That said, these lines stick out as being obviously wrong. The global
statement is used within the context of a function to declare that a
name used within that function has global scope rather than local
scope. There is no meaning to using the statement at the module level
like this -- Python already knows the name is global, because it's not
being used within a function -- and I'd be surprised if this didn't
result in a SyntaxError.
More information about the Python-list
mailing list