Single Pound # comments versus Double Pound ## comments
Jeff Epler
jepler at unpythonic.net
Fri Oct 4 19:10:35 EDT 2002
On Fri, Oct 04, 2002 at 04:04:00PM -0700, Terry Hancock wrote:
> ###
> This might be a block comment in some hypothetical
> future version of Python. Although I'm not holding
> my breath.
> ###
>
> Might be very sensible, analogous to the """ string
> definitions.
[...]
> Except that it could be more unambiguous --
> such as being used to block out code even within
> expressions:
>
> this_is_a_dict = {
> 'spam':1,
> ###
# Didn't really want this part, but might later:
>
> 'ham':3,
> 'eggs':4,
> ###
> 'morespam':2
> }
How is this "more unambiguous", given that the code fragment above has a
meaning today?
Jeff
More information about the Python-list
mailing list