Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
pyEnumAuto
#python 3.6.9 #pyEnumAuto #this code is created by Rezaul Hoque on January 14,2022;contact: jewelmrh@yahoo.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; from enum import Enum, auto class Dec: def Dec(func) : def wrap(self): print("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>") func(self) print("Enum auto() function example: \n") return wrap @Dec def fun1(self): print(' ') class Dec2: def Dec2(func): def wrap(self): print("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>") func(self) print("January 14,2022 \n") return wrap @Dec2 def fun2(self): print(' ') a=Dec() a.fun1() class FoodOrder(Enum): def _generate_next_value_(name, start, count, last_values): return name.lower() Ordered = auto() Completed = auto() Refunded = auto() #def __str__(self): # return f'{self.name(self.value)}' for stat in FoodOrder: print(stat.name, stat.value) b=Dec2() b.fun2()
run
|
edit
|
history
|
help
0
reverse the number
Nearest Prime Number
Ej2_python_204676887
alternative dict.get (faster)
E
dict()
Breadth-First Path Finding
V
камень ножницы бумага
First python practice