Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

fixedint

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixedint - npm Package Compare versions

Comparing version
0.1.3
to
0.1.4
+3
-0
CHANGES

@@ -0,2 +1,5 @@

v0.1.4, 2019-04-21:
Fix help(fixedint) (GH #2)
v0.1.0, 2014-06-21:
Initial release.
+1
-1
Metadata-Version: 1.1
Name: fixedint
Version: 0.1.3
Version: 0.1.4
Summary: simple fixed-width integers

@@ -5,0 +5,0 @@ Home-page: https://github.com/nneonneo/fixedint

@@ -8,4 +8,5 @@ # -*- coding: utf-8 -*-

class FixedProperty(object):
def __init__(self, val):
def __init__(self, val, doc):
self.val = val
self.__doc__ = doc
def __get__(self, obj, type=None):

@@ -17,5 +18,9 @@ return self.val

class FixedMetaProperty(object):
def __init__(self, name):
def __init__(self, name, doc):
self.name = name
self.__doc__ = doc
def __get__(self, obj, type=None):
if self.name not in obj.__dict__:
# this should only happen when trying to access FixedInt.prop, which help() does
raise AttributeError("Attribute %s not defined on base class" % self.name)
prop = obj.__dict__[self.name]

@@ -34,2 +39,8 @@ return prop.__get__(obj)

_doc_width = "Bit width of this integer, including the sign bit."
_doc_signed = "True if this integer is a twos-complement signed type."
_doc_mutable = "True if this integer is mutable (modifiable in-place)."
_doc_minval = "Minimum representable value of this integer type"
_doc_maxval = "Maximum representable value of this integer type"
_subclass_token = object()

@@ -73,7 +84,7 @@ class _FixedIntBaseMeta(type):

dict = {}
dict['width'] = FixedProperty(width)
dict['signed'] = FixedProperty(signed)
dict['mutable'] = FixedProperty(mutable)
dict['minval'] = FixedProperty(min)
dict['maxval'] = FixedProperty(max)
dict['width'] = FixedProperty(width, doc=_doc_width)
dict['signed'] = FixedProperty(signed, doc=_doc_signed)
dict['mutable'] = FixedProperty(mutable, doc=_doc_mutable)
dict['minval'] = FixedProperty(min, doc=_doc_minval)
dict['maxval'] = FixedProperty(max, doc=_doc_maxval)

@@ -105,7 +116,7 @@ if signed:

width = FixedMetaProperty('width')
signed = FixedMetaProperty('signed')
mutable = FixedMetaProperty('mutable')
minval = FixedMetaProperty('minval')
maxval = FixedMetaProperty('maxval')
width = FixedMetaProperty('width', doc=_doc_width)
signed = FixedMetaProperty('signed', doc=_doc_signed)
mutable = FixedMetaProperty('mutable', doc=_doc_mutable)
minval = FixedMetaProperty('minval', doc=_doc_minval)
maxval = FixedMetaProperty('maxval', doc=_doc_maxval)

@@ -112,0 +123,0 @@ class _FixedIntMeta(_FixedIntBaseMeta):

Metadata-Version: 1.1
Name: fixedint
Version: 0.1.3
Version: 0.1.4
Summary: simple fixed-width integers

@@ -5,0 +5,0 @@ Home-page: https://github.com/nneonneo/fixedint

[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0

@@ -17,3 +17,3 @@ try:

name = 'fixedint',
version = '0.1.3',
version = '0.1.4',
author = 'Robert Xiao',

@@ -20,0 +20,0 @@ author_email = 'robert.bo.xiao@gmail.com',