Ignore:
Timestamp:
Dec 17, 2011, 5:52:59 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
287d6ec
Parents:
5d24a81
git-author:
Jessica B. Hamrick <jhamrick@…> (12/17/11 17:52:59)
git-committer:
Jessica B. Hamrick <jhamrick@…> (12/17/11 17:52:59)
Message:

Comment formatting standardization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/ipp/value.py

    rdf51061 r5c5fe6d  
    77logger = logging.getLogger(__name__)
    88
    9 def setter(prop):
    10     def f(func):
    11         return property(prop.fget, func, prop.fdel, prop.__doc__)
    12     return f
    13 
    149class Value(object):
    15     """
    16     An IPP value consists of a tag and a value.
     10    """An IPP value consists of a tag and a value.
    1711
    1812    From RFC 2565:
     
    2620     |                     value                   |   v bytes
    2721     -----------------------------------------------   
     22
    2823    """
    2924
    3025    def __init__(self, value_tag=None, value=None):
    31         """
    32         Initialize a Value.  There are three different ways you can
     26        """Initialize a Value.  There are three different ways you can
    3327        call this method:
    3428
     
    4842            value -- variable size, containing the actual value.
    4943            It should be a string or number.
     44
    5045        """
    5146
     
    6257    @classmethod
    6358    def unpack(cls, value_tag, packed_value):
    64         """Unpack a binary IPP value
    65 
    66         Unpacks a binary string into a Value object.
     59        """Unpack a binary IPP value into a Value object.
    6760
    6861        """
     
    7164    @staticmethod
    7265    def _unpack(value_tag, packed_value):
    73         """
    74         Given self.value_tag and self.packed_value, unpack the binary
    75         value into either a string or number.  These values MUST NOT
    76         be null.
     66        """Given self.value_tag and self.packed_value, unpack the
     67        binary value into either a string or number.  These values
     68        MUST NOT be null.
    7769
    7870        Returns: unpacked value
     
    170162    @property
    171163    def packed_value(self):
    172         """
    173         Given self.value_tag and self.value, pack the value into
     164        """Given self.value_tag and self.value, pack the value into
    174165        binary form.  These values MUST NOT be null.
    175166
     
    270261        return packed_value
    271262
    272     @setter(packed_value)
     263    @packed_value.setter
    273264    def packed_value(self, packed_value):
    274265        """Replace a value using a new packed value
     
    281272    @property
    282273    def packed_value_size(self):
    283         """
    284         Get the size of the value in bytes.
     274        """Get the size of the value in bytes.
     275       
    285276        """
    286277       
     
    289280    @property
    290281    def total_size(self):
    291         """
    292         Get the total size of the IPP value.
     282        """Get the total size of the IPP value.
     283       
    293284        """
    294285
Note: See TracChangeset for help on using the changeset viewer.