Skip to content
75. Python Talks


Keep your plans for the 28th of November free, because we are back with the 75th Python Glasgow event! Get ready for another evening of drinks, pizza and talks!

Time: 18:00 - 21:00

Venue: MBN Solutions - 112 West George Glasgow.

Speaker: Mark Smith
Title/Topic: Stupid Things I've Done With Python

I have a GitHub repository that contains a compilation of all the awful code I've written over the years, abusing features like metaclasses, decorators, various __dunder__ methods, and the mutable nature of Python's underlying data structures.
It's a funny way to see how Python works under the hood, but it's also educational.
Each of the tricks is entertainingly terrible. But they're also mostly self-contained ways to see what happens when you override certain behaviours of the Python language.

Anyone with an intermediate level of Python understanding should be able to follow along and learn something.
I will cover:
* Replacing an imported module with a class, so attribute lookups can be @properties, with hilarious results.
* Overriding the `sub` magic method to create a hyphenated, fuzzy-matching version of a boolean.
* Using getattr to save time implementing all the functions in the `math` module.
* Using eq to make things that aren't really the same look the same.

This talk is an entertaining tour of the Python Data Model, and the things you can do - if you're so inclined.



If you are interested in speaking/presenting at one of our future Python Glasgow Events, please do feel free to contact any of the organisers/co-organisers in order to make this happen.

Photo of Python Glasgow group
Python Glasgow
See more events