selfteaching / selfteaching/selfteaching-python-camp
【自学内容】 文档字符串添加注释的疑惑
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
用文档字符串添加注释,一开始不太明白注释的意思,于是运行出来的结果就是一个空的{},后来发现要打“-> ”如果后面跟的是int str float之类的数据类型他会返回一个尖括号里面class: ,应该是将这种类型的字符注释出来,然而作业要求的是“文档字符串”,我试了一下并没有doc或者docstring这样的类型,于是又试着直接打了‘’‘,在里面写了一些内容,运行后发现大括号里的class不见了,就是我刚打的内容,不知道这样操作对不对啊?而且注释是写了一个注释函数,这样每次调用它注释的内容都是一样的啊,用什么办法让每次注释文档的不同注释内容也不同吗?还是说这个注释操作有什么巧妙的办法?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the assignment wording and the Python documentation on docstrings and annotations. No repository file, test, or entry point is identified; the issue needs a concrete, agreed documentation or example change before implementation can begin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100