473,378 Members | 1,417 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,378 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 978

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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.