Skip to content

Latest commit

 

History

History
94 lines (80 loc) · 4.56 KB

README.md

File metadata and controls

94 lines (80 loc) · 4.56 KB

Python language issues

This repo contains Python practical examples of certain topics like:

  • Classes

    • Inheritance
  • Class Methods

    • Method overriding in runtine
    • Abstract methods
    • Static methods
    • var-args methods
    • dictionary-typed arguments in methods
    • mixed method types (var-args + kw-args)
    • using global variables inside methods
    • mutable arguments (changed with each call) in methods like on example below
    def mutableArgsWarn(self, x=[]):
        print "--- mutableArgsWarn ---"
        x.append(1)
        print x
    print datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    print datetime.strptime('Wed, 27 Oct 1770 22:17:00', '%a, %d %b %Y %H:%M:%S')
   print "another year:",timedelta(weeks=40, days=84, hours=23, minutes=50, seconds=600)