Why can't Python annotate multiple lines?

Asked 1 years ago, Updated 1 years ago, 87 views

Why can't Python annotate multiple lines?

I know that you use "" or '" to process multiple lines, but technically, it's right to classify it as a string, so I exclude it.

Other languages support multi-line annotation, such as /* */ or <!-->, but why isn't Python there?

Python supports everything with functions and standard functions, but I don't know why it didn't make that uncomfortable.

python multiline comment

2022-09-21 18:00

1 Answers

Guido van Rossum, who created Python language, thought it was unnecessary (...)

Guido also recommended a method of annotating with three large/small quotes.

Related article

Python tip: You can use multi-line strings as multi-line comments. Unless used as docstrings, they generate no code! :-)


2022-09-21 18:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.