Java to Python - how to??

Discussion in 'Python' started by ka_czor@poczta.onet.pl, Jun 13, 2005.

  1. Guest

    Hello

    I just start programing in Python.
    I've got a qestion, how translate the example code writen in Java to
    Python??


    public class ConnectionManager {

    public ConnectionManager() {
    super();
    }
    public void sendAgent(Agent anAgent, WorkplaceAddress anAddress) {

    }
    }

    bye
     
    , Jun 13, 2005
    #1
    1. Advertising

  2. wrote:

    > Hello
    >
    > I just start programing in Python.
    > I've got a qestion, how translate the example code writen in Java to
    > Python??
    >
    >
    > public class ConnectionManager {
    >
    > public ConnectionManager() {
    > super();
    > }
    > public void sendAgent(Agent anAgent, WorkplaceAddress anAddress) {
    >
    > }
    > }
    >
    > bye



    class ConnectionManager(object):

    def __init__(self):
    super(ConnectionManager,self).__init__()

    def sendAgent(self, anAgent, anAddress):
    pass


    George
     
    George Sakkis, Jun 13, 2005
    #2
    1. Advertising

  3. JZ Guest

    Dnia Mon, 13 Jun 2005 12:13:52 +0200, napisa³(a):

    > I just start programing in Python.
    > I've got a qestion, how translate the example code writen in Java to
    > Python??
    >
    >
    > public class ConnectionManager {
    >
    > public ConnectionManager() {
    > super();
    > }
    > public void sendAgent(Agent anAgent, WorkplaceAddress anAddress) {
    >
    > }
    > }



    class ConnectionManager:
    def __init__(self):
    pass
    def sendAgent(anAgent, anAddress):
    pass

    or

    class ConnectionManager(object):
    def __init__(self):
    super(ConnectionManager, self).__init__()
    def sendAgent(anAgent, anAddress):
    pass

    --
    JZ
     
    JZ, Jun 13, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Kintner
    Replies:
    0
    Views:
    852
    Michael Kintner
    Nov 30, 2003
  2. Ilias Lazaridis
    Replies:
    0
    Views:
    581
    Ilias Lazaridis
    Feb 1, 2005
  3. manish sahu
    Replies:
    3
    Views:
    1,009
  4. Isaac
    Replies:
    0
    Views:
    379
    Isaac
    Jan 20, 2011
  5. sahm
    Replies:
    9
    Views:
    660
    Joshua Cranmer
    Nov 3, 2011
Loading...

Share This Page