Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyMetaParam
#python 3.6.9 #PyMetaParam: Metaclass uses parameters #this code is created by Rezaul Hoque on February01,2022; #contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.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 pprint import pprint class Garden(type): def __new__(cls, Garden, supcls, attrdict, **kwargs): c_ = super().__new__(cls, Garden, supcls, attrdict) if kwargs: for name, value in kwargs.items(): setattr(c_, name, value) return c_ class RoofGard(object, metaclass=Garden, kind='Vegetable', location='Rooftop'): def __init__(self, title,add): self.title = title self.add =add pprint(RoofGard.__dict__) a=RoofGard('The Garden','EastSide Lakefront,NoVille') print(a.title,' is located at ',a.add,'.')
run
|
edit
|
history
|
help
0
3-6.격자판 최대합
Python Practice
kenken1
Python
Convert to lowercase
Lesson 8!
inverse matrix gauss jordan
A list is shuffled and reshuffled till the 0th index of the list matches
PrimeNumbers
123