This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This library provides utilities to use features of other languages in Python.

You can find a functional example of each feature in the examples directory. Test cases in tests directory run on top of these examples to ensure the functionality.

Access Modifiers

To identify a variable as private::

from pythonlangutil.access_modifiers import private_variable

class PrivateVariableTest(object):
   def __init__(self): = "123"

   def __setattr__(self, *args, **kwargs):
       return object.__setattr__(self, *args, **kwargs)

   def insider(self): = "321"

To identify a method as private::

from pythonlangutil.access_modifiers import private_function

class PrivateFunctionTest(object):
   def __init__(self):

   def private_method(self):
       return 'called from inside my own class'

   def insider(self):
       return self.private_method()

Creating Overloads

To create overloads::

from pythonlangutil.overload import Overload, signature

class OverloadTest():
    def __init__(self):
        self.male_pref = "Mr. %s"
        self.female_pref = "Ms. %s"
        self.general_pref = "Dear %s"

    @signature("str", "bool")
    def my_method(self, name, male):
        if male:
            return self.male_pref % name
        return self.female_pref % name

    def my_method(self, name):
        return self.general_pref % name

    @signature("int", "str")
    def my_method(self, times, name):
        return "\n".join([self.general_pref % name for i in range(times)])

Using Singleton Model

It prevents the instantiation of the class. The only instance of the class will be accessible through get_instance() method which will be added to class automatically.

To use singleton::

from pythonlangutil.singleton import Singleton

class SingletonTest():
    def __init__(self):
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (7.3 kB) Copy SHA256 Checksum SHA256 Source Apr 26, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting