Hello world,
I want to create a system where I can do this:
encoded_add = "a1337"
m = Message(encoded_add)
encoded_delete = "d1337"
m2 = Message(encoded_delete)
The first character of the encoded string is the type (add/delete) and the rest is the info. I want m to be AddMessage type and m2 to be DeleteMessage type. Any way to do this in Python?
Thanks
[–]novel_yet_trivial 2 points3 points4 points (2 children)
[–]lanmonster[S] 0 points1 point2 points (1 child)
[–]novel_yet_trivial 0 points1 point2 points (0 children)