D5441: rust-cpython: binding for LazyAncestors

Yuya Nishihara yuya at tcha.org
Sun Dec 23 23:56:34 EST 2018


> +/// The purpose of this module is to hide identifiers from other Rust users
> +///
> +/// Some of the identifiers we are defining are meant for consumption
> +/// from Python with other naming conventions. For instance, `py_class!`
> +/// does not let us make a distinction between the Python and the Rust name,
> +/// and that name ends up in particular in the `__class__` attribute, so that
> +/// renaming it inside its Python module is not enough.
> +///
> +/// For Rust consumers, we will reexport these definitions, following the
> +/// appropriate naming convention.
> +mod concealed_detail {
> +    use super::*;
> +
> +    py_class!(pub class lazyancestors |py| {

Does the class name actually matter? Personally I don't care if
`lazyancestors()` function returns a `LazyAncestors` object. We'll anyway
need a wrapper function to make pure ancestors and rustext ancestors
compatible.


More information about the Mercurial-devel mailing list