2 new comment-like characters in Python to aid development?

dbhbarton at googlemail.com dbhbarton at googlemail.com
Fri Mar 9 06:11:13 EST 2007


On Mar 9, 10:59 am, "BJörn Lindqvist" <bjou... at gmail.com> wrote:
> On 9 Mar 2007 02:31:14 -0800, dbhbar... at googlemail.com
>
>
>
>
>
> <dbhbar... at googlemail.com> wrote:
> > Thanks for the thoughts.
>
> > > This could be implemented without new syntax: just make your editor
> > > recognize some special comments, and apply the highlighting to the
> > > following block. By example,
>
> > >                 # XXX Remove this when FuruFaifa is fixed to always provide
> > >                 # XXX the names in the same order
> > >                 names.sort()
> > >                 names.reverse()
>
> > Yes I recognise that we can use existing comments for this purpose,
> > and if I was suitably gifted I guess I could try to make the IDE
> > recognise these 'special comments', and maybe even work out what block
> > they're meant to apply to. Of course I'll still argue that the WIP
> > character would be a more elegant, speedy and versatile alternative.
>
> But you are overloading the ? character for a purpose which it totally
> was not meant for. What the character means really depends on what
> person you are asking. To me, it means that what precedes it is
> something someone or something does not know and wants to know the
> answer to. To me, it really does not mean that what follows it is work
> in progress.
>
> Even if I could intuitively tell that a question mark represents a
> work in progress, that information is not very useful. Similarly to
> the "under construction" animated gifs that were popular on the web in
> the mid 90-ties, the symbol does not convey any useful information.
> WHY is it a work in progress? Is there something wrong with it?
>
> ?def foobar():
>     do stuff
>
> The question mark does not leave me any the wiser. Now if you replace
> that question mark with a comment:
>
> # foobar() is buggy because it throws weird exceptions when x = 42.
> def foobar():
>     do stuff
>
> That gives me some useful information.
>
> --
> mvh Björn- Hide quoted text -
>
> - Show quoted text -

perhaps another character would be preferable. '~' perhaps. As to what
you use the WIP character for- in my mind the purpose is to allow an
extra type/level of commenting over and above #, which is inherently
flexible. I could for example choose to use ? (or ~) for blocks I'm
still writing, ?? (or ~~) for blocks that are buggy, and ??? (or ~~~)
for blocks that work but could use optimization. It's a commenting
shortcut for me as the script's developer and its advantage over #
comments are speed or insertion/removal.
Ah but I can see I'm not winning anybody over. I shall graciously
retire!




More information about the Python-list mailing list