adambard / adambard/learnxinyminutes-docs

python3: unexplained @ thing (convention?) introduced

Aperta
#3,587 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Markdown
Stelle
12.3k
Fork
3.7k
Merge medio
13h 10m
PR unite (30g)
6

Descrizione

Something, I don't know what, that begins with a snail magically appears in this document ( .https://learnxinyminutes.com/docs/python3/ ) section 6 with no explanation:-

```
# A class method is shared among all instances
# They are called with the calling class as the first argument
@classmethod
def get_species(cls):
return cls.species
```
What is "@classmethod", and what does it do, and what other things can go there? If it's just a do-nothing comment, we should be told such things exist someplace, and it shouldn't be all-lower-case in that situation.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start from the Python 3 document at https://learnxinyminutes.com/docs/python3/, section 6, around the @classmethod example. Read the surrounding class-method text and add enough explanation that the @ decorator syntax and @classmethod are introduced before use. Done means a reader can tell @classmethod is not a comment and understands what kind of construct can appear there.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.