-
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…
-
`ruff check` produces false positive DJ012 for Django models like so:
```
class Person(models.Model):
name = models.CharField(xxxx)
def __init__(self, *args, **kwargs):
…
-
### Title
Introduction to magic method
### Describe your Talk
Magic methods, also called "dunder" methods (because they start and end with double underscores, like __init__), allow us to defi…
-
_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
When using `==` `__eq__` or `!=` `__ne__` on numpy arrays from mojo like the following.
```mojo
from python import Python
def main():
var np = Python.import_module(…
-
I saw that #423 / #265 are talking about assets. I was trying to create a blog post called `__init__` so that the URL would be `https:///blog/__init__` which was intended to be a pun for an intro post…
-
It is assumed there is some mechanism for automatically daggering, quantum controlling or powering (repeating) unitary subroutines. This may be higher order, `with` blocks. See #158 #361 etc.
Users…
-
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
9 months ago
-
### 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…