7 Things I Never Knew About Magic Methods in Python (Until Recently)

Опубликовано: 19 Октябрь 2024
на канале: Python With Liu
1,850
56

1) slicing behaviour
2) _repr_ vs _str_
3) binary magic methods
4) super().__init__
5) _getattr_ vs _getattribute_
6) stopping users from accessing _dict_
7) _new_ vs _init_

My coding setup:
Logitech MX Master Mouse: https://amzn.to/3T6h2gm
magic keyboard: https://amzn.to/3P4aQV2
magic trackpad: https://amzn.to/4364sCn
twelve south magicbridge: https://amzn.to/3TnAhDK
Dell 34 Inch Curved USBC Monitor S3423DWC: https://amzn.to/3V9USwF
Ergotune Supreme V3: https://amzn.to/3T2ffcm
macbook pro: https://amzn.to/49VJYyy

Cheers