abcd a écrit : > When do I need to use a trailing slash to separate code over multiple > lines. > > For example: > > x = "hello world, this is my multiline " + \ > "string!!!!"
Here you don't need the + > x = {'name' : \ > 'bob'} And here you don't need the antislash > Do I need to use the "\" in the above examples? When do i need to use > it? > IIRC, lists, tuples and dicts litterals, function args, list comps and generator expressions can span multiple lines. In any other case, you need the antislash. But you'd better check in the FineManual... -- http://mail.python.org/mailman/listinfo/python-list