splitting a long token across lines

Elaine Jackson elainejackson7355 at home.com
Sun Apr 4 15:34:50 EDT 2004


why can't you just write it like this:

MODULUS = A*pow(10,a) + \
                        B*pow(10,b) + \
                        C

"Nakamura" <lambajan at yahoo.com> wrote in message
news:ef0c9173.0404032349.742f59e6 at posting.google.com...
| Hi all,
|
| Say, I have a very long integer constant , how can
| I split across lines ?
| I tried something like
| MODULUS = 7567567567567567567567567567567\
|           7567507546546986094860986094860\
|           2345646986598695869548498698989\
|           ...
| but it doesn't compile.
| Is there another way to write a long numeric constant besides writing
| it as a string and then converting to long? I also wouldn't like to put
| it all on one very long line.
|
| Thanks!





More information about the Python-list mailing list