- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/relatedwork.tex
rec20ab9 r41c4b5e 423 423 424 424 \section{Golang} 425 \label{s:Golang} 425 426 426 427 Golang has a no enumeration. … … 1068 1069 1069 1070 Python is a dynamically-typed reflexive programming language with multiple versions, and hence, it is possible to extend existing or build new language features within the language. 1070 As a result, discussing Python enumerations is a moving target, because if a features does not exist, i f can often be created with varying levels of complexity.1071 Nevertheless, an attempt has been made to discusscore enumeration features that come with Python 3.13.1071 As a result, discussing Python enumerations is a moving target, because if a features does not exist, it can often be created with varying levels of complexity within the language. 1072 Nevertheless, the following is a discuss of the core enumeration features that come with Python 3.13. 1072 1073 1073 1074 A Python enumeration type is a set of ordered scoped identifiers (enumerators) bound to \emph{unique} values. … … 1081 1082 class Week(Enum): Mon = 1; Tue = 2; Wed = 3; Thu = 10; Fri = @auto()@; Sat = 4; Sun = @auto()@ 1082 1083 \end{python} 1083 where @auto@ increments by 1 from the previous enumerator value .1084 where @auto@ increments by 1 from the previous enumerator value \see{Golang \lstinline[language=Go]{iota}, \VRef{s:Golang}}. 1084 1085 Object initialization and assignment are restricted to the enumerators of this type. 1085 1086 An enumerator initialized with same value is an alias and invisible at the enumeration level, \ie the alias it substituted for its aliasee. … … 1108 1109 \end{cquote} 1109 1110 1110 A s an enumeration is a \lstinline[language=python]{class}, its ownmethods.1111 An enumeration \lstinline[language=python]{class} can have methods. 1111 1112 \begin{python} 1112 1113 class Week(Enum):
Note: See TracChangeset
for help on using the changeset viewer.