java to python q's
Shaun
shogan at iel.ie
Mon May 15 11:08:43 EDT 2000
(from the java code below)
1) whats the differance between public and private and what is the
equivalent in python?
2) how do i declare the variable nvsequence of type NvSequence in python?
3) is this.id = id; the same as self.id = id, in python?
public class Message
{
private int id;
private int subId;
private NvSequence nvSequence;
file://overloaded constructor 1
file://sets up member vars id, subId of type int and nvSequence of type
NvSequence
public Message(int id, int subId, NvSequence nvSequence)
{
this.id = id;
this.subId = subId;
this.nvSequence = nvSequence;
}
4)in java:
public Message(int id, int subId)
{
this.id = id;
this.subId = subId;
this.nvSequence = null;
}
how do i set this.nvSequence to null in python?
is it:
def msg(id,subid,nvSequence=None)?
5)how/what modules do i use to find the index of the first/second integer in
a string?
=====================
Shaun Hogan
Interactive Enterprise Ltd.
alt. E-mail : shaun_hogan at yahoo.com
The University of Limerick Rollerhockey Club
URL: http://www.csn.ul.ie/~dek/ulrhc
Phone: +353 86 8342529
More information about the Python-list
mailing list