Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions guide/src/building-and-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ Trying out PyO3 is much easier using dynamic embedding.
The known complications are:

- To import compiled extension modules (such as other Rust extension modules, or those written in C), your binary must have the correct linker flags set during compilation to export the original contents of `libpython.a` so that extensions can use them (e.g. `-Wl,--export-dynamic`).

- The C compiler and flags which were used to create `libpython.a` must be compatible with your Rust compiler and flags, else you will experience compilation failures.

Significantly different compiler versions may see errors like this:
Expand Down
2 changes: 2 additions & 0 deletions guide/src/class/numeric.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ There are three obvious solutions:

<!-- no-glossary-link:wheel -->
However that would be quite boring - we'd be reinventing the wheel.

- We can raise exceptions whenever `Number` overflows, but that makes the API painful to use.

- We can wrap around the boundary of `i32`.
This is the approach we'll take here.
To do that we'll just forward to `i32`'s `wrapping_*` methods.
Expand Down
12 changes: 12 additions & 0 deletions guide/src/class/protocols.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ The given signatures should be interpreted as follows:
### Basic object customization

- `__str__(<self>) -> object (str)`

- `__repr__(<self>) -> object (str)`

- `__hash__(<self>) -> isize`

Objects that compare equal must have the same hash value.
Expand Down Expand Up @@ -76,10 +78,15 @@ The given signatures should be interpreted as follows:
</details>

- `__lt__(<self>, object) -> object`

- `__le__(<self>, object) -> object`

- `__eq__(<self>, object) -> object`

- `__ne__(<self>, object) -> object`

- `__gt__(<self>, object) -> object`

- `__ge__(<self>, object) -> object`

The implementations of Python's "rich comparison" operators `<`, `<=`, `==`, `!=`, `>` and `>=` respectively.
Expand Down Expand Up @@ -129,7 +136,9 @@ The given signatures should be interpreted as follows:
```

If the second argument `object` is not of the type specified in the signature, the generated code will automatically `return NotImplemented`. </details>

- `__getattr__(<self>, object) -> object`

- `__getattribute__(<self>, object) -> object`

<details>
Expand All @@ -143,12 +152,15 @@ The given signatures should be interpreted as follows:
</details>

- `__setattr__(<self>, value: object) -> ()`

- `__delattr__(<self>, object) -> ()`

Overrides attribute access.

- `__bool__(<self>) -> bool`

Determines the "truthyness" of an object.

- `__call__(<self>, ...) -> object` - here, any argument list can be defined as for normal `pymethods`

### Iterable objects
Expand Down
18 changes: 9 additions & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading