SpiceQA
Questions
Tags
Users
Badges
magic-methods
48 Questions
Newest
Active
Unanswered
Frequent
More
Score
View
Card
Compact
Assigning vs. Defining Python Magic Methods
user_16436774
0
•
asked Aug 22, 2022
23
4
1583
assign
magic-methods
class
python
Why type has no __class_getitem__ method or __getitem__ method in Python3.10?
user_17980931
0
•
asked Jul 22, 2022
2
0
123
typing
magic-methods
python
How to find out which method is called by an operator?
user_10680954
0
•
asked Jul 14, 2022
1
0
28
magic-methods
python-3.x
python
Why isn't my class initialized by "def __int__" or "def _init_"? Why do I get a "takes no arguments" TypeError, or an AttributeError?
user_523612
0
•
asked Jun 2, 2022
3
1
299
typeerror
magic-methods
initialization
class
python
How can I override a special method defined in a metaclass with a custom classmethod?
user_4356104
0
•
asked May 17, 2022
6
2
107
metaclass
magic-methods
overriding
python
Generic lazy initializer class and magic methods
user_2989330
0
•
asked Apr 6, 2022
2
1
41
metaclass
lazy-initialization
magic-methods
python
When will the Python special method (i.e. magic method) __len__ be called?
user_18295344
0
•
asked Mar 21, 2022
4
3
116
magic-methods
python
Why does print(t) error if t.__str__() returns a non-string, but not print(t.__str__())?
user_14026460
0
•
asked Aug 8, 2021
30
7
2829
typeerror
magic-methods
type-conversion
python
Why doesn't __qualname__ work the same way in @classmethod than in metaclass
Camion_9077457
0
•
asked Jul 19, 2021
3
1
129
metaclass
class-method
magic-methods
python-3.x
Why is `x[i]` not equivalent to `x.__getitem__(x)`?
user_554036
0
•
asked Jul 12, 2021
4
2
111
magic-methods
syntactic-sugar
python
1
(current)
2
3
4
5
Next
Next
Hot Questions