Is it Python or is it C ?

Charles Hixson charleshixsn at earthlink.net
Thu Mar 9 18:15:51 EST 2000


That's not so much an American usage as a programming usage.  Compilers take
things *so* literally.  If one leaves out or adds a punctuation mark at the end
of a quote delimited string, this can cause bad things to happen.  So (Pascal,
I believe) programmers started telling their editors and copy-readers - put it
EXACTLY as I have listed it.  Don't move the punctuation.  So...
print "What do you want, NOW?"
e.g., had a question mark within the quotes.  Ditto for terminal periods,
colons, semicolons, etc.
There were many arguments with proofreaders in the course of straightening this
out, and the resolution was that even normal text was handled in this way.  I
believe that in books that do not involve programming text the traditional
rules are still adhered to (but I haven't been paying much attention).

Greg Ewing wrote:

> Steve Holden wrote:
> > since in UK usage
> > the closing punctuation is also used to close the sentence, and
> > so we would write:
> >
> > ... to "which preferred pydioms yield the best performing bytecode?"
> >
> > whereas I understand correct American usage would be:
> >
> > ... to "which preferred pydioms yield the best performing bytecode"?
>
> My understanding is that if the thing being quoted is a complete
> sentence in itself, the closing punctuation goes inside the
> quote, otherwise it goes outside. E.g.
>
>    The question is: "Which preferred pydioms yield the best
>    performing bytecode?"
>
> as opposed to something like
>
>    There is a question as to which preferred pydioms yield
>    "the best performing bytecode".
>
> --
> Greg Ewing, Computer Science Dept,
> +--------------------------------------+
> University of Canterbury,          | A citizen of NewZealandCorp, a       |
> Christchurch, New Zealand          | wholly-owned subsidiary of USA Inc.  |
> greg at cosc.canterbury.ac.nz         +--------------------------------------+




More information about the Python-list mailing list