Content-Length: 274892 | pFad | https://github.com/pythonnet/pythonnet/issues/2311

D0 Allow setting typed objects via PyModule.Set · Issue #2311 · pythonnet/pythonnet · GitHub
Skip to content

Allow setting typed objects via PyModule.Set #2311

@dmitry-medvedev

Description

@dmitry-medvedev

Environment

  • Pythonnet version: 3.0.1
  • Python version: 3.11
  • Operating System: Windows 11
  • .NET Runtime: .NET 4.8

Details

  • Right now, a .NET object can be passed to the Python scripting engine via PyModule.Set, which internally calls ToPythonDetectType(value)
    We'd like to pass a certain interface that the object supports, so only methods of this interface are available for Python scripting.

I suspect that adding the overloaded method PyModule.Set or ConverterExtension.ToPython that accepts the type of the object may resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/pythonnet/pythonnet/issues/2311

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy