Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

dynamically created methods are confusing for users #233

@HDembinski

Description

@HDembinski

I am teaching about uproot and I found that several methods on a jagged array do not seem to exist, but they can be accessed anyway.

# x is a JaggedArray
dir(x)
['__class__',
 '__delattr__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__get__',
 '__getattribute__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__le__',
 '__lt__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__self__',
 '__self_class__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__thisclass__',
 '_content',
 '_counts',
 '_isvalid',
 '_offsets',
 '_parents',
 '_starts',
 '_stops',
 'leafcount']

But x.content, x.starts, etc. can be accessed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions