Comments (4)
Fixed in version 1.7.2.5
Original comment by pyscripter
on 20 Nov 2006 at 7:56
- Changed state: Fixed
from pyscripter.
def test():
pass
"""This should not be PyDOC!"""
still produces a PyDOC string. According to the Python documentation
(http://www.python.org/dev/peps/pep-0257/):
"A docstring is a string literal that occurs as the first statement in a module,
function, class, or method definition. Such a docstring becomes the __doc__
special
attribute of that object."
Note: the "raw" and "unicode" strings does not seems to be supported either.
Original comment by [email protected]
on 22 Nov 2006 at 10:18
from pyscripter.
a) Triple quote comments not immediately after the definition of a class and a
function
You are right on this point. However one has to be pragmatic and balance the
speed
of parsing and coding with the treatment of corner cases. How often have you
seen
stand-alone triple quote strings in the middle of a function? If it is for
comment
purposes one would just use comments. Note that assignments such as
a = """ string """
are not treated as docstrings.
b) raw and unicode triple quote comments are supported. Try
def f():
r"""Test Comment"""
pass
def g():
u"""Test Comment"""
pass
Original comment by pyscripter
on 22 Nov 2006 at 11:20
from pyscripter.
> You are right on this point. However one has to be pragmatic and balance the
speed
of parsing and coding with the treatment of corner cases.
Why so? To identify the doc sting you only have to parse the first statement
after
the definition. If the line does not begin with a triple while now you look
through
the whole code. My feeling is that it will be even faster.
> How often have you seen stand-alone triple quote strings in the middle of a
function? If it is for comment purposes one would just use comments.
Yes, that's my coding habits. I often copy large parts of code to mangle with
it, and
putting triple code at the beginning and the end is faster than commenting each
line.
:-P This is how I found this bug in the first place.
Oops, sorry. I actually meant:
def g():
u"""T\xe9st Comm\xe9nt"""
pass
Should be: “Tést Commént”
and
def h():
"""Test Comme\nt"""
pass
Should be: “Test Comme
t”
You are right, the raw is behaving as expected – shows the string literally.
Original comment by [email protected]
on 23 Nov 2006 at 2:30
from pyscripter.
Related Issues (20)
- python 3.4 not compatable HOT 2
- Please add a zip file for registry-free installation for the 64-bit version HOT 1
- Is there a way to replace particular characters in a text file with a user input? HOT 1
- Support HOT 1
- Python version support HOT 1
- Not able to run PyScripter HOT 3
- UI and editor stuttering HOT 6
- Pyscripter becomes "Not responding" during running of a script HOT 1
- Evertime you run PyScripter, a new shortuct is created and the version increases by 1 HOT 1
- single # comment (the green font comments) OR user editor macro ability HOT 1
- Access Violation HOT 2
- Google Code is dying HOT 1
- PyScripter 2.5.3.0 DLL Hijacking HOT 5
- Code Explorer shows incorrect globals
- ImportError: No module named Tkinter
- Google Code is dying
- Please add support to a diff utility
- PyScripter 2.5.3 (64bit) not working with Python 3.4.3 (64bit) on Win10 Preview HOT 1
- Doesn't work with Python 3.4
- set $[SelectedDir] as working directory of external tool,does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyscripter.