-
Here's a comprehensive list of dunder methods that can be overloaded in Python:
Arithmetic Operators:
__add__: Addition (+)
__sub__: Subtraction (-)
__mul__: Multiplication (*)
__truediv__: T…
-
### Current problem
I'm using pyreverse to visualize the structure of sympy which is a fairly large project, with a lot of relations modelled by classes, but also some functionality like iterators im…
-
_Originally posted by @fubuloubu in https://github.com/vyperlang/vyper/issues/3716#issuecomment-1873545832_
```vyper
# NOTE: Could be defined as an internal library type
struct Ledger(HashMap[a…
-
### Bug description
As title. It's odd since most other types work.
### Steps to reproduce
```mojo
fn main():
alias le = Int.__le__ # error: cannot form a reference to overloaded declaration of…
-
Opened as a followup to discussion at #9706.
Kudos to @AlexWaygood for scraping all dunders from CPython:
> This is the set of dunders that were surfaced in my script and are not currently liste…
bswck updated
8 months ago
-
Related to [false positive on PLC2801 "unnecessary dunder... for __setattr__" #9584](https://github.com/astral-sh/ruff/issues/9584)
`object.__setattr__` is the recommended way to set attributes on …
my1e5 updated
4 months ago
-
### Bug description
When converting an unbound method (on a class) to a bound method (on an object) by calling `__get__`, pylint emits an `unnecessary-dunder-call` warning:
```py
class Cls:
…
-
### Review Mojo's priorities
- [X] I have read the [roadmap and priorities](https://docs.modular.com/mojo/roadmap.html#overall-priorities) and I believe this request falls within the priorities.
…
-
I want to Proxy an object using Pyro5, which has a `__call__` method defined. Therefore, I can do `object()` but when I then use Pyro5 and have
```
proxy_object = Pyro5.api.Proxy(uri_from_ns)
prox…
-
The `AreaDefinition` methods support several special methods, for which documentation is missing on readthedocs. The most relevant ones for the user are `__contains__`, `__eq__`, and `__getitem__`. …