Differences between revisions 1 and 2
Revision 1 as of 2003-08-15 00:39:08
Size: 1021
Editor: ip503dabc3
Comment:
Revision 2 as of 2003-08-15 00:39:49
Size: 923
Editor: ip503dabc3
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
Python supports three types of string literals. Strings can be enclosed in single quotes ('), double quotes ("}). They can also be enclosed in groups of three single or double quotes (and are then referred to as triple-quoted strings). A well designed mode should support all three types. In particular, a mode should correctly recognize that triple-quoted strings can include unescaped newlines and quotes.

Code examples or references on how to deal with strings should follow.
Python supports three types of string literals. Strings can be enclosed in single quotes ('), double quotes (") and in groups of three single or double quotes (and are then referred to as triple-quoted strings). A well designed mode should support all three types. In particular, a mode should correctly recognize that triple-quoted strings can include unescaped newlines and quotes.

Python's syntax requires special handling in the construction of a Python-mode. Two issues are particular to Python:

TableOfContents

Indentation

Python uses indentation to group statements. A well designed mode should offer support for smart indentation of code. For example, a line beginning with the keywork def and ending with : should cause the editor to indent the following line upon hitting of the return key.

Code examples or references on how to deal with indentation should follow.

Strings

Python supports three types of string literals. Strings can be enclosed in single quotes ('), double quotes (") and in groups of three single or double quotes (and are then referred to as triple-quoted strings). A well designed mode should support all three types. In particular, a mode should correctly recognize that triple-quoted strings can include unescaped newlines and quotes.

EditorConfigurationHowto (last edited 2023-09-17 13:10:57 by MatsWichmann)

Unable to edit the page? See the FrontPage for instructions.