Skip to content

object.__sizeof__ #356

Closed
Closed

Description

@mrveera

The following methods need to implement in src/vm/obj/objobject.

  • object . __setattr__
  • object . __lt__
  • object . __le__
  • object . __gt__
  • object . __ge__
  • object . __reduce_ex__
  • object . __reduce__
  • object . __subclasshook__
  • object . __init_subclass__
  • object . __format__
  • object . __sizeof__
  • object . __dir__
  • object . __doc__

Activity

  1. Tom1380 commented on Feb 9, 2019

    @Tom1380
    Contributor

    @veera83372 you forgot to sign __doc__ as implemented.

  2. Mec-iS commented on Feb 14, 2019

    @Mec-iS

    A nice list of protocols with examples is here

  3. dralley commented on Oct 3, 2019

    @dralley
    Contributor

    Current status is just

    object.__init_subclass__
    object.__reduce__
    object.__reduce_ex__
    object.__sizeof__
    
  4. tekknolagi commented on Oct 23, 2019

    @tekknolagi

    __reduce__ and __reduce_ex__ look implemented

  5. dralley commented on Dec 6, 2020

    @dralley
    Contributor

    It's just object.__sizeof__ missing now.

  6. changed the title [-]Expected methods on object[/-] [+]object.__sizeof__[/+] on Apr 18, 2022
  7. youknowone commented on Oct 7, 2026

    @youknowone
    Member

    object.__sizeof__ is implemented (crates/vm/src/builtins/object.rs). The other methods on this checklist were already done.

    Payload-size reporting still disagrees with CPython (object().__sizeof__() is 0 here). That leftover is #1250 / #3743.

    Closing as resolved.

    — commented by Grok 4.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions