the quick reference

Serge Orlov <[email protected]> Tue, 22 Jun 2004 12:41:25 +0400
Newsgroups gmane.comp.lang.prothon.devel
Message-ID <[email protected]>
Oops, forgot to insert the quick reference.




Python to Prothon translation quick reference

legend:
    ???:              Unknow status
    not implemented:  not implemented by the interpreter
    pyCompat          provided by pyCompat module
    prFuture          provided by prFuture module

module(global) scope:
  __builtins__        All builtin functions are Object's attributes
       __doc__        doc_ (Not implemented) Assign manually at the top
                      of module
      __file__        file_ (Not implemented)
      __name__        name_ (Not implemented) Assign manually at the top
                      of module
                      (__name__ == "__main__") test is (isMain?) in Prothon

module __builtin__:
                pyCompat prFuture Prothon replacement
      __debug__                   ???
     __import__                   ???
            abs             x     
         apply                    deprecated even in Python
     basestring    x               use type(obj) is String
           bool                   ???
         buffer                   almost deprected in Python, use Bytes
       callable    x              just call the object, 
            chr    x              construct String from Bytes
    classmethod                   ???
            cmp  pyCmp            doesn't work right now, bug #37
         coerce                   almost deprected in Python
        compile                   ???
        complex                   Imaginary
        delattr    x              doesn't work right now, bug #38
           dict                   Dict
            dir    x              
         divmod                   not implemented
      enumerate             x     
           eval                   not implemented
       execfile                   not implemented
           file                   use File, Dir, TextFile
         filter    x              
          float                   Float
        getattr    x              ???
        globals                   ???
        hasattr    x              ???
           hash    x              use Object.hash_(), 
            hex    x              use "{value:x}", 
             id    x              use Object.objId_()
          input                   don't use this dangerous function
            int                   Int
         intern                   almost deprected in Python
     isinstance             x      blocked by t3.pr bug
     issubclass                   ???
           iter                   ???, pending protocols/interface decision
            len                   len
           list                   List
         locals                   ???
           long                   Int
            map    x              
            max    x              
            min    x
         object                   Object
            oct    x              
           open                   use File, Dir, TextFile
            ord    x              
            pow                   not implemented
       property                   ???
          range                   use List(range(...))
     raw_input:                   Main.stdInFile.readline(), not implemented 
         reduce    x              
         reload                   ???
           repr    x              String(obj)
          round                   not implemented
        setattr    x              
          slice                   not implemented
   staticmethod                   ???
            str    x              
            sum    x              
          super                   ???
          tuple                   Tuple
           type             x     
         unichr                   not implemented
        unicode                   String
           vars                   not implemented, depends on locals
         xrange    x              use range
            zip    x              blocked by interpreter bug