Skip to content

Cannot access indexer from .NET derived class #256

@Thraka

Description

@Thraka

If you create a .NET base class that has an indexer, and then create a .NET derived class, that derived class used in Python cannot access the indexer. You can access existing properties though just fine.

import clr

clr.AddReference("PythonTest")

import PythonTest

a = PythonTest.IndexerBase()
b = PythonTest.Indexer()

print("count of items from base class: %i" % a.Count)
print("count of items from derived class: %i" % b.Count)
print("printing base class value: %s" % a[1])
print("printing derived class value: %s" % b[1]) #ERROR HERE

PythonTest Library.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy