ó
a°V]c           @   sW   d  Z  d d l m Z m Z m Z m Z d Z d e f d „  ƒ  YZ d d d „ Z d S(	   s   
This package defines an object type which can efficiently represent
a bitarray.  Bitarrays are sequence types and behave very much like lists.

Please find a description of this package at:

    http://pypi.python.org/pypi/bitarray/

Author: Ilan Schnell
iÿÿÿÿ(   t	   _bitarrayt   bitdifft
   bits2bytest   _sysinfos   1.0.1t   bitarrayc           B   s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sM  bitarray([initial], [endian=string])

Return a new bitarray object whose items are bits initialized from
the optional initial, and endianness.
If no object is provided, the bitarray is initialized to have length zero.
The initial object may be of the following types:

int, long
    Create bitarray of length given by the integer.  The initial values
    in the array are random, because only the memory allocated.

string
    Create bitarray from a string of '0's and '1's.

list, tuple, iterable
    Create bitarray from a sequence, each element in the sequence is
    converted to a bit using truth value value.

bitarray
    Create bitarray from another bitarray.  This is done by copying the
    memory holding the bitarray data, and is hence very fast.

The optional keyword arguments 'endian' specifies the bit endianness of the
created bitarray object.
Allowed values are 'big' and 'little' (default is 'big').

Note that setting the bit endianness only has an effect when accessing the
machine representation of the bitarray, i.e. when using the methods: tofile,
fromfile, tobytes, frombytes.c         C   s   |  j  | j ƒ  ƒ S(   sŽ   fromstring(str)

Append from a string, interpreting the string as machine values.
Deprecated since version 0.4.0, use ``frombytes()`` instead.(   t	   frombytest   encode(   t   selft   string(    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt
   fromstring/   s    c         C   s   |  j  ƒ  j ƒ  S(   sò   tostring() -> str

Return the string representing (machine values) of the bitarray.
When the length of the bitarray is not a multiple of 8, the few remaining
bits (1..7) are set to 0.
Deprecated since version 0.4.0, use ``tobytes()`` instead.(   t   tobytest   decode(   R   (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt   tostring6   s    c         C   s   t  d ƒ ‚ d  S(   Ns&   int() cannot take bitarray as argument(   t	   TypeError(   R   (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt   __int__?   s    c         C   s   t  d ƒ ‚ d  S(   Ns'   long() cannot take bitarray as argument(   R   (   R   (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt   __long__B   s    c         C   s   t  d ƒ ‚ d  S(   Ns(   float() cannot take bitarray as argument(   R   (   R   (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt	   __float__E   s    (   t   __name__t
   __module__t   __doc__R	   R   R   R   R   (    (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyR      s   					i   c         C   s&   d d l  m } | j d |  d | ƒ S(   sp   test(verbosity=1, repeat=1) -> TextTestResult

Run self-test, and return unittest.runner.TextTestResult object.
iÿÿÿÿ(   t   test_bitarrayt	   verbosityt   repeat(   R   R   t   run(   R   R   R   (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt   testI   s    N(	   R   t   bitarray._bitarrayR    R   R   R   t   __version__R   R   (    (    (    s0   lib/python2.7/site-packages/bitarray/__init__.pyt   <module>
   s   "9