Skip to content

Commit

Permalink
Merge branch 'PyO3:main' into herquan_cr1
Browse files Browse the repository at this point in the history
  • Loading branch information
herquan committed May 18, 2022
2 parents 0b2e831 + e16dad3 commit b7043f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/exceptions.rs
Expand Up @@ -5,8 +5,8 @@
//! The structs in this module represent Python's built-in exceptions, while the modules comprise
//! structs representing errors defined in Python code.
//!
//! The latter are created with the [`import_exception`] macro, which you can use yourself
//! to import Python exceptions.
//! The latter are created with the [`import_exception`](crate::import_exception) macro, which you
//! can use yourself to import Python exceptions.

use crate::{ffi, PyResult, Python};
use std::ffi::CStr;
Expand Down
21 changes: 11 additions & 10 deletions src/instance.rs
Expand Up @@ -541,8 +541,9 @@ impl<T> Py<T> {
///
/// This is equivalent to the Python expression `self.attr_name`.
///
/// If calling this method becomes performance-critical, the [`intern!`] macro can be used
/// to intern `attr_name`, thereby avoiding repeated temporary allocations of Python strings.
/// If calling this method becomes performance-critical, the [`intern!`](crate::intern) macro
/// can be used to intern `attr_name`, thereby avoiding repeated temporary allocations of
/// Python strings.
///
/// # Example: `intern!`ing the attribute name
///
Expand Down Expand Up @@ -577,8 +578,8 @@ impl<T> Py<T> {
///
/// This is equivalent to the Python expression `self.attr_name = value`.
///
/// To avoid repeated temporary allocations of Python strings, the [`intern!`] macro can be used
/// to intern `attr_name`.
/// To avoid repeated temporary allocations of Python strings, the [`intern!`](crate::intern)
/// macro can be used to intern `attr_name`.
///
/// # Example: `intern!`ing the attribute name
///
Expand Down Expand Up @@ -660,8 +661,8 @@ impl<T> Py<T> {
///
/// This is equivalent to the Python expression `self.name(*args, **kwargs)`.
///
/// To avoid repeated temporary allocations of Python strings, the [`intern!`] macro can be used
/// to intern `name`.
/// To avoid repeated temporary allocations of Python strings, the [`intern!`](crate::intern)
/// macro can be used to intern `name`.
pub fn call_method<N, A>(
&self,
py: Python<'_>,
Expand Down Expand Up @@ -691,8 +692,8 @@ impl<T> Py<T> {
///
/// This is equivalent to the Python expression `self.name(*args)`.
///
/// To avoid repeated temporary allocations of Python strings, the [`intern!`] macro can be used
/// to intern `name`.
/// To avoid repeated temporary allocations of Python strings, the [`intern!`](crate::intern)
/// macro can be used to intern `name`.
pub fn call_method1<N, A>(&self, py: Python<'_>, name: N, args: A) -> PyResult<PyObject>
where
N: IntoPy<Py<PyString>>,
Expand All @@ -705,8 +706,8 @@ impl<T> Py<T> {
///
/// This is equivalent to the Python expression `self.name()`.
///
/// To avoid repeated temporary allocations of Python strings, the [`intern!`] macro can be used
/// to intern `name`.
/// To avoid repeated temporary allocations of Python strings, the [`intern!`](crate::intern)
/// macro can be used to intern `name`.
pub fn call_method0<N>(&self, py: Python<'_>, name: N) -> PyResult<PyObject>
where
N: IntoPy<Py<PyString>>,
Expand Down

0 comments on commit b7043f4

Please sign in to comment.