I've been using Python for quite some time now, and I'm a bit stumped.
Does it really not have a multi-line comment? I think I must just be
missing something simple and stupid.
Thanks in advance.
Doug Tolton 14 91622
In article <4q********************************@4ax.com>,
Doug Tolton <dt*****@yahoo.com> wrote: Does it really not have a multi-line comment? I think I must just be missing something simple and stupid.
'''
Most people use triple-quoted strings
for multi-line comments.
'''
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/
This is Python. We don't care much about theory, except where it intersects
with useful practice. --Aahz
On Mon, 11 Aug 2003 14:17:38 -0500, Skip Montanaro <sk**@pobox.com>
wrote: Nope, no multi-line comment. The python-mode package which is available for Emacs and XEmacs supports commenting a block of text. You can also use triple-quoted strings:
How do you comment the block of text with Emacs? That is what I'm
using for my code editor.
I was wondering if a triple-quoted string not assigned would work, but
I hadn't got arround to trying it yet.
Doug Tolton
Doug Tolton <dt*****@yahoo.com> writes: How do you comment the block of text with Emacs? That is what I'm using for my code editor.
In Python mode, use C-c # to comment the selected region and C-u C-c #
to uncomment a region. The commenting is done with "##" at the front
of every line in the region, so it normally stands out from actual
comments due to the #-doubling.
-- David
Doug Tolton <dt*****@yahoo.com> writes:
[...] How do you comment the block of text with Emacs? That is what I'm using for my code editor.
C-c #
I use C-x r k to uncomment (kill-rectangle), but I'm sure there must
be an uncomment-region in there somewhere...
I was wondering if a triple-quoted string not assigned would work, but I hadn't got arround to trying it yet.
The only trouble with TCSs is that emacs gets confused more easily
than with '## ' multiline-comments. And recent CVS python-modes have
had broken docstring fill (still broken, actually, whitespace gets
collapsed sometimes... must file a bug).
John
>>>>> "John" == John J Lee <jj*@pobox.com> writes:
John> Doug Tolton <dt*****@yahoo.com> writes: [...] How do you comment the block of text with Emacs? That is what I'm using for my code editor.
John> C-c #
John> I use C-x r k to uncomment (kill-rectangle), but I'm sure there
John> must be an uncomment-region in there somewhere...
Just do C-u C-c #
Regards,
Isaac.
Isaac To <kk**@csis.hku.hk> writes: >> "John" == John J Lee <jj*@pobox.com> writes:
[...] John> I use C-x r k to uncomment (kill-rectangle), but I'm sure there John> must be an uncomment-region in there somewhere...
Just do C-u C-c #
D'oh!
John
On Mon, 11 Aug 2003 14:17:38 -0500, Skip Montanaro wrote: Doug> I've been using Python for quite some time now, and I'm a bit Doug> stumped. Does it really not have a multi-line comment? I think I Doug> must just be missing something simple and stupid.
Nope, no multi-line comment. The python-mode package which is available for Emacs and XEmacs supports commenting a block of text. You can also use triple-quoted strings:
That always stumped me as well. Any idea what the justification for this
was, Skip?
-c
On Tuesday 12 August 2003 22:07, Christopher Blunck wrote: Nope, no multi-line comment. The python-mode package which is available for Emacs and XEmacs supports commenting a block of text. You can also use triple-quoted strings:
That always stumped me as well. Any idea what the justification for this was, Skip?
none of the other shell/script languages have one either. I rarely miss it.
On Tue, 12 Aug 2003 23:21:16 -0700, Chad Netzer <cn*****@sonic.net>
wrote: (along with block indent/dedent with a decent editor)
In emacs what are the key strocks for block indent and dedent?
Man, I wonder if I'll even learn 10% of the Emacs keystrokes.
Doug Tolton
On Wed, 2003-08-13 at 00:03, Doug Tolton wrote: (along with block indent/dedent with a decent editor) In emacs what are the key strocks for block indent and dedent?
In python-mode:
C-c >
C-c <
Man, I wonder if I'll even learn 10% of the Emacs keystrokes.
I don't even know 1%, but I know the 1% that counts. :)
--
Chad Netzer
On Wednesday 13 August 2003 07:03, Doug Tolton wrote: Man, I wonder if I'll even learn 10% of the Emacs keystrokes.
From inside an Emacs python buffer, do
M-x py-describe-mode
-- Neil
[Doug Tolton] Man, I wonder if I'll even learn 10% of the Emacs keystrokes.
And then, you'll realise than pre-made keystrokes are only a small part
of all available commands. And then, you'll realise that all available
commands are only a small part of all available functions. And, of course,
all of the above is only a small drop in the ocean of possibilities given
by the capability of extending the editor with new functions. At times,
I wonder if this should be seen as comforting or frightening. :-)
--
François Pinard http://www.iro.umontreal.ca/~pinard
Francois> At times, I wonder if this should be seen as comforting or
Francois> frightening. :-)
Adventurous...
Skip
Chad Netzer wrote: In emacs what are the key strocks for block indent and dedent?
In python-mode:
C-c > C-c <
Oh cool. I've been using C-x r o and C-x r k to open and kill
rectangles. Your way seems much easier. ;) Thanks. ;)
-tom!
--
There's really no reason to send a copy of your
followup to my email address, so please don't. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ajikoe |
last post by:
Hello,
Is anyone has experiance in running python code to run multi thread
parallel in multi processor. Is it possible ?
Can python manage which cpu shoud do every thread?
Sincerely Yours,...
|
by: Frank Jona |
last post by:
Intellisense with C# and a multi-file assembly is not
working. With VB.NET it is working.
Is there a fix availible?
We're using VisualStudio 2003
Regards
Frank
|
by: * ProteanThread * |
last post by:
but depends upon the clique:
...
|
by: frankenberry |
last post by:
I have multi-page tiff files. I need to extract individual frames from the
multi-page tiffs and save them as single-page tiffs. 95% of the time I
receive multi-page tiffs containing 1 or more black...
|
by: cody |
last post by:
What are multi file assemblies good for?
What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a
single multi file assembly (A.DLL+A.NETMODULE)?
|
by: Joe |
last post by:
I have 2 multi-list boxes, 1 displays course categories based on a
table called CATEGORIES. This table has 2 fields CATEGORY_ID,
CATEGORY_NAME
The other multi-list box displays courses based on...
|
by: mimmo |
last post by:
Hi! I should convert the accented letters of a string in the correspondent
letters not accented. But when I compile with -Wall it give me:
warning: multi-character character constant
Do the...
|
by: Shane Story |
last post by:
I can seem to get the dimensions of a frame in a multiframe tiff.
After selecting activeframe, the Width/Height is still really much larger
than the page's actual dimensions.
When I split a...
|
by: bobwansink |
last post by:
Hi, I'm relatively new to programming and I would like to create a C++
multi user program. It's for a project for school. This means I will
have to write a paper about the theory too. Does anyone...
|
by: Sabri.Pllana |
last post by:
We apologize if you receive multiple copies of this call for papers.
***********************************************************************
2008 International Workshop on Multi-Core Computing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
| |