Don't forget
'''
This is a comment
'''
Which you'll need to use if you use """ for docstrings.
Byron wrote:
> """
> Yes, this is generally how it is done in python.
> """
--
http://mail.python.org/mailman/listinfo/python-list
Marc Boeren wrote:
Well, you could fake it by doing
"""
block of code here is commented out
"""
"""
Yes, this is generally how it is done in python.
"""
Byron
---
--
http://mail.python.org/mailman/listinfo/python-list
>> if False:
>>
>> (indented) block of code here is commented out
>> I've no idea how efficient it is compared to triple-quoted strings or
>> line by line comments.
Gustavo> Actually, it's infinitly [sp?] more defficient (contrary of
Gustavo> efficient?) than triple-
Gustavo Córdova Avila wrote in news:mailman.6944.1101838678.5135.python-
[EMAIL PROTECTED] in comp.lang.python:
> Actually, it's infinitly [sp?] more defficient
> (contrary of efficient?) than triple-quoted strings
> or line-by-line comments, because those two never
> make it to execution stage, b
Rob Williscroft wrote:
Riko Wichmann wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Dear all,
is there a way in Python to comment out blocks of code without putting a
# in front of each line? Somethings like C's
/*
block of code here is commented out
*/
if False:
(indented) block of
Riko Wichmann wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> Dear all,
>
> is there a way in Python to comment out blocks of code without putting a
> # in front of each line? Somethings like C's
>
> /*
> block of code here is commented out
> */
>
if False:
(indented) block of
Riko> I'm using emacs (with python-mode) to do most of my editing.
C-c # is bound to py-comment-region in python-mode.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Gustavo Córdova Avila wrote:
Riko Wichmann wrote:
is there a way in Python to comment out blocks of code without putting
a # in front of each line? Somethings like C's
I haven't seen the "other" way to block-comment multiple
lines of code: triple-quoted strings.
Building on this thought: it's ver
Riko Wichmann wrote:
Dear all,
is there a way in Python to comment out blocks of code without putting
a # in front of each line? Somethings like C's
/*
block of code here is commented out
*/
Thanks,
Riko
I haven't seen the "other" way to block-comment multiple
lines of code: triple-quoted
Uwe Grauer <[EMAIL PROTECTED]> writes:
> Riko,
>
> if you are using emacs, try C-c # to comment out a block of code.
> Unfortunally Uncomment is not bound to a key by default.
> Do a key-binding for it by yourself.
In Emacs, you can have the comment-region command do uncomment by
typing C-u firs
Riko Wichmann <[EMAIL PROTECTED]> wrote:
> I'm using emacs (with python-mode) to do most of my editing. also tried
> IDLE from python already, which is nice but an old dog doesn't like to
> learn new tricks :)
Emacs is great for stuff like this. There's probably other ways to do
it, but what I
On 2004-11-30, Uwe Grauer <[EMAIL PROTECTED]> wrote:
> if you are using emacs, try C-c # to comment out a block of code.
> Unfortunally Uncomment is not bound to a key by default.
Uncomment is C-u C-c #, at least in xemacs. Rectangle delete sometimes
works in a pinch (C-x r k, once you've marked
Ha! have just discover C-c # myself (sometimes it helps to actually look
at the emacs menus, even if you are used to using the key-bindings :)
Better yet works "Meta-;" as Bernhard suggested, because it comments and
un-comments marked line!
Thanks for all the helpful tips!
- Riko
Riko,
I'm using emacs (with python-mode) to do most of my editing. also tried
IDLE from python already, which is nice but an old dog doesn't like to
learn new tricks :)
Maybe I just don't know to comment out whole blocks using editor
commands. Probably the trick Marc mentions in the following post wi
Riko Wichmann wrote:
I'm using emacs (with python-mode) to do most of my editing. also tried
IDLE from python already, which is nice but an old dog doesn't like to
learn new tricks :)
Maybe I just don't know to comment out whole blocks using editor
commands. Probably the trick Marc mentions in
Riko Wichmann <[EMAIL PROTECTED]> writes:
> I'm using emacs (with python-mode) to do most of my editing.
[...]
> Maybe I just don't know to comment out whole blocks using editor
> commands.
comment-dwim (usually bound to M-; ) comments out the region if it's
active, or, if the region is already c
> Riko Wichmann wrote:
>
> > Dear all,
> >
> > is there a way in Python to comment out blocks of code
> without putting
> > a # in front of each line? Somethings like C's
> >
> > /*
> > block of code here is commented out
> > */
Well, you could fake it by doing
"""
block of code h
Riko Wichmann wrote:
Dear all,
is there a way in Python to comment out blocks of code without putting
a # in front of each line? Somethings like C's
/*
block of code here is commented out
*/
No. Why do you want this? Any good programmer's editor will have a
comment/uncomment feature to mak
18 matches
Mail list logo