Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Also 0.0.2

    Download button

    No screenshots available
    Downloads: 56  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Huan Do | More programs
    Other/Proprietary Li... / FREE
    September 4th, 2012, 04:10 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Also description

    Ever had lots of methods that do the same thing?!

    You want to set them to the same thing but don't want to do something lame like:

    python
       def method(self):
           pass

       othermethod = method


    Rather you want to do it with style like

    python
       @also('othermethod')
       def method(self):
           pass


    Then do I have a solution for you!

    Installation

    pip install also

    Usage

    python
    from also import also, AlsoMetaClass

    class Foo:
        __metaclass__ = AlsoMetaClass

        @also('getThing')
        @also('get_thing')
        def getthing(self):
            return 'go bears'

    foo = Foo()
    assert (foo.getthing() == foo.get_thing() ==
            foo.getThing() == 'go bears')



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Python methods | Python library | Python | methods | AlsoMetaClass

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM