miniblog.
← Back to all posts
Jul 26, 2016 at 21:44
Great site of slides demoing metaclasses in Python (with friendly examples!)
Dustin Ingram - What Is and What Can Be: An Exploration from `type` to Metaclasses
Wilfred Hughes
Related Posts
Sep 17, 2013 at 17:45
I've actually used metaclasses today! Ensuring a #Python class is never instantiated twice with the same arguments:
Ensure no class gets instantiated twice with the same arguments.
Ensure no class gets instantiated twice with the same arguments. - cached_instances.py
Wilfred Hughes
Shared words: metaclasses, Python Score: 34.1
Apr 23, 2013 at 16:14
Abusing metaclasses to avoid adding a self argument to methods:
https://www.voidspace.org.uk/python/articles/metaclasses.shtml#the-selfless-metaclass
#python (not advisable in practice!)
Wilfred Hughes
Shared words: metaclasses, Python Score: 34.1
Mar 23, 2013 at 13:22
Used #Python metaclasses in anger yesterday -- as with most metaprogramming, usually a bad idea, but occasionally a huge boon.
Wilfred Hughes
Shared words: metaclasses, Python Score: 34.1