[Tutor] Python Documentation Clarification

David Hutto smokefloat at gmail.com
Mon Jul 12 17:48:58 CEST 2010


On Mon, Jul 12, 2010 at 10:49 AM, Huy Ton That <huyslogic at gmail.com> wrote:
> This is going to sound silly, but I realized there are some areas within the
> documentation that do not make absolute sense to me.
> e.g.
> compile(source, filename, mode[, flags[, dont_inherit]])
> I see within this built in function, the first argument can be what they
> define as source, the second argument as the filename and the third as the
> mode.
> But what confuses me is sometimes I see a bracket, above as [, flags[,
> dont_inherit]]. Is this an optional argument like flags=dont_inherit?
> Just not grokking it correctly and I can't seem to track down where the
> documentation formatting is defined within the python.org documentation...
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>

From

http://docs.python.org/tutorial/datastructures.html

is this :
'(The square brackets around the i in the method signature denote that
the parameter is optional, not that you should type square brackets at
that position. You will see this notation frequently in the Python
Library Reference.)'


More information about the Tutor mailing list