473,287 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Is it possible to use a instance property as a default value ?

hello,

I would like to use instance parameters as a default value, like this:

class PlotCanvas(wx.Window):
def __init__(self)
self.Buf_rp = 0
self.Buf_wp = 0

def Draw ( self, x1 = self.Buf_rp, x2 = self.Buf_wp ) :

is something like this possible ?

thanks,
Stef Mientki
Nov 1 '07 #1
0 976

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave | last post by:
Hi everyone, (I already posted this to the VS.NET IDE news group without any responses, so I'm attempting one more time in this group) The issue I'm having is occuring in the IDE of VS.NET...
17
by: bengamin | last post by:
Hi, I have a C# class and two instance of the class; the class have some property. I want to compare the property value of the two instance How should i do? override == ? use delegate ?
2
by: Andrzej Kaczmarczyk | last post by:
Hi, I have following problem: (warning, quite long post with lots of code) I have an object of a known type like this. class MyClass { public int Property1; public string Property2; }
7
by: Buddy Ackerman | last post by:
I created this class Public Class HTMLFileInput : Inherits System.Web.UI.HtmlControls.HtmlInputFile Public Property Data As String Get Return ViewState("HTMLFileInput.Data") End Get Set...
12
by: Eric | last post by:
I have a custom component that can be dragged from the ToolBox onto a Windows Form (which means I can't modify it's constructor to add a name parameter). VS assigns it an instance name, but the...
8
by: Jordi Rico | last post by:
Hi, I've made the next inherited class in Visual Studio 2005: Public Class LabelEx Inherits System.Windows.Forms.Label Sub New() MyBase.New() Me.ForeColor = Color.Black Me.AutoSize = False...
4
by: Tony Johansson | last post by:
Hello! I have a class definition called MyClass see below. I create an instance of this class MyClass I also want this instance to be able to modify the test instance that exist in this...
2
by: Chicken15 | last post by:
Hi Group. First of all I'm sorry for asking (maybe) such easy questions. But I'm quite stuck now and couldn't come up with a solution by using my C# book or googling. So it would be nice if...
3
by: Darren Dale | last post by:
Does anyone know if it is possible to add a property to an instance at runtime? I didn't see anything about it in the standard library's new module, google hasn't turned up much either. Thanks,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.