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