Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
595 views

Decorate instance method with (arbitrary) meta data in python

Requirements What I need: attach meta information to methods, such that it is 'easy' to retrieve all such methods for a given class instance methods can still be called 'in a normal way', e.g. ...
Michael Hoff's user avatar
3 votes
2 answers
6k views

Failing fast by raising an exception with a custom message

This is a script that utilizes lazy exception throwing. What I do is decorate a function that might throw an exception to throw an exception with a formatted string. ...
JaDogg's user avatar
  • 4,531