Skip to content

Bikeshedding names: Py and PyObject #873

@davidhewitt

Description

@davidhewitt

Having written this fairly innocent comment in #863:

I've been wondering what happens if we renamed PyObject to just Object - I don't think the Py is particularly interesting and typing Py<Object> is heck of a lot less annoying than Py<PyObject>. This would be a good moment to do such a rename if we're breaking everything anyway.

It seems like a few people had ideas and opinions about what we could do on this point, mostly focussing on renaming Py.

Rather than let that discussion sidetrack from discussion in #863, I thought it best to open this issue.

The current names Py, and PyObject are fine, though I am always open to improving things if there's a strong community opinion for one thing over another. To be clear though, a rename of such core pieces like this would cause a lot of churn to all pyo3 users - so if we do this, let's wait until we're totally confident on the names we like, and then do the rename once only.

Some proposals of alternative names for Py:

  • PyRc

Some proposals of alternative names for PyObject:

An interesting option is what rlua does; types are not Lua prefixed in the API, but they are in rlua::prelude to avoid confusion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions