Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] no support for parameterized properties with default values
----------------------------------------------
ISSUES
1. [New issue] no support for parameterized properties with default values
http://ironpython.codeplex.com/workitem/35722
User nsstl has proposed the issue:
"The code in the bottom raise the exception [unsupported operand type(s) for -:
'indexer#' and 'int'] if I use the expression with the call for prop1
Option Explicit On
Option Strict On
Imports Microsoft.Scripting.Hosting
Imports IronPython.Hosting
Imports Microsoft.Scripting
Public Class TestObject
Public ReadOnly Property prop1(Optional param As Double = 10) As Double
Get
Return param * 9
End Get
End Property
Public ReadOnly Property prop2 As Double
Get
Return 999
End Get
End Property
End Class
Module Module1
Sub Main()
Dim obj As TestObject = New TestObject
Dim engine As ScriptEngine = Python.CreateEngine()
Dim scope As ScriptScope = engine.CreateScope()
scope.SetVariable("obj", obj)
Dim expression As CompiledCode =
engine.CreateScriptSourceFromString("test = obj.prop1 - 11",
SourceCodeKind.Statements).Compile()
'Dim expression As CompiledCode =
engine.CreateScriptSourceFromString("test = obj.prop2 - 11",
SourceCodeKind.Statements).Compile()
expression.Execute(scope)
Dim ret As Double = CType(scope.GetVariable("test"), Double)
Console.WriteLine("returned value from python: " & ret)
Console.ReadLine()
End Sub
End Module
"
----------------------------------------------
----------------------------------------------
You are receiving this email because you subscribed to notifications on
CodePlex.
To report a bug, request a feature, or add a comment, visit IronPython Issue
Tracker. You can unsubscribe or change your issue notification settings on
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users