rsclib 0.66__py3-none-any.whl → 0.67__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rsclib/Version.py +1 -1
- rsclib/iter_recipes.py +2 -1
- rsclib/{Rational.py → rational.py} +19 -10
- {rsclib-0.66.dist-info → rsclib-0.67.dist-info}/METADATA +11 -5
- {rsclib-0.66.dist-info → rsclib-0.67.dist-info}/RECORD +8 -8
- {rsclib-0.66.dist-info → rsclib-0.67.dist-info}/WHEEL +0 -0
- {rsclib-0.66.dist-info → rsclib-0.67.dist-info}/entry_points.txt +0 -0
- {rsclib-0.66.dist-info → rsclib-0.67.dist-info}/top_level.txt +0 -0
rsclib/Version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION="0.
|
1
|
+
VERSION="0.67"
|
rsclib/iter_recipes.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
#!/usr/bin/python
|
2
|
-
#
|
3
|
-
# Copyright (C) 2007-17 Dr. Ralf Schlatterbeck Open Source Consulting.
|
2
|
+
# Copyright (C) 2007-24 Dr. Ralf Schlatterbeck Open Source Consulting.
|
4
3
|
# Reichergasse 131, A-3411 Weidling.
|
5
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
6
5
|
# All rights reserved
|
@@ -152,10 +151,7 @@ class Rational (autosuper) :
|
|
152
151
|
other = self.__class__ (other)
|
153
152
|
p = self.p * other.q
|
154
153
|
q = self.q * other.p
|
155
|
-
|
156
|
-
p = -p
|
157
|
-
q = -q
|
158
|
-
return self.__class__ (p, q)
|
154
|
+
return p // q
|
159
155
|
# end def __floordiv__
|
160
156
|
|
161
157
|
def __rfloordiv__ (self, other) :
|
@@ -164,6 +160,23 @@ class Rational (autosuper) :
|
|
164
160
|
return other // self
|
165
161
|
# end def __rfloordiv__
|
166
162
|
|
163
|
+
def __truediv__ (self, other) :
|
164
|
+
if not isinstance (other, self.__class__) :
|
165
|
+
other = self.__class__ (other)
|
166
|
+
p = self.p * other.q
|
167
|
+
q = self.q * other.p
|
168
|
+
if q < 0 :
|
169
|
+
p = -p
|
170
|
+
q = -q
|
171
|
+
return self.__class__ (p, q)
|
172
|
+
# end def __truediv__
|
173
|
+
|
174
|
+
def __rtruediv__ (self, other) :
|
175
|
+
if not isinstance (other, self.__class__) :
|
176
|
+
other = self.__class__ (other)
|
177
|
+
return other / self
|
178
|
+
# end def __rtruediv__
|
179
|
+
|
167
180
|
def __int__ (self) :
|
168
181
|
return int (self.p // self.q)
|
169
182
|
# end def __int__
|
@@ -193,10 +206,6 @@ class Rational (autosuper) :
|
|
193
206
|
return self + other
|
194
207
|
# end def __radd__
|
195
208
|
|
196
|
-
def __rdiv__ (self, other) :
|
197
|
-
return self.__class__ (other) // self
|
198
|
-
# end def __rdiv__
|
199
|
-
|
200
209
|
def __repr__ (self) :
|
201
210
|
if self.q == 1 :
|
202
211
|
return "%d" % self.p
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: rsclib
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.67
|
4
4
|
Summary: Misc. basic stuff needed by RSCs tools
|
5
5
|
Home-page: http://rsclib.sourceforge.net/
|
6
|
-
Download-URL: http://downloads.sourceforge.net/project/rsclib/rsclib/0.
|
6
|
+
Download-URL: http://downloads.sourceforge.net/project/rsclib/rsclib/0.67/rsclib-0.67.tar.gz
|
7
7
|
Author: Ralf Schlatterbeck
|
8
8
|
Author-email: Ralf Schlatterbeck <rsc@runtux.com>
|
9
9
|
License: GNU Library or Lesser General Public License (LGPL)
|
@@ -146,11 +146,17 @@ Alternatively get it from pypi and/or install via pip.
|
|
146
146
|
Changes
|
147
147
|
-------
|
148
148
|
|
149
|
+
Version 0.67: Bugfixes in rational and iter_recipes.batched
|
150
|
+
|
151
|
+
- iter_recipes.batched now doesn't return an empty batch
|
152
|
+
- Rename Rational module to rational
|
153
|
+
- Fix division in rational module
|
154
|
+
|
149
155
|
Version 0.66: Hexdump parsing, iter_recipes.batched
|
150
156
|
|
151
|
-
|
152
|
-
|
153
|
-
|
157
|
+
- Add iter_recipes.batched which appears in Python 3.12
|
158
|
+
- Hexdump parsing is more tolerant now
|
159
|
+
- Some overlooked Python3 changes
|
154
160
|
|
155
161
|
Version 0.65: Use pyproject.toml
|
156
162
|
|
@@ -4,9 +4,8 @@ rsclib/Math.py,sha256=JZcPCkD6SsGZoZNHbzxxAxRIiX0eYhEKenMKg7VQbx0,2983
|
|
4
4
|
rsclib/PDF_Signature.py,sha256=plV2gwnVY_eK1ihHFgTRaqjdqx8pG2z1lYejr4oYkDU,13272
|
5
5
|
rsclib/PM_Value.py,sha256=OA4eNL6-Wlz7tESSQDU3H-bLlhTW_wJnWQXVqXaBzI0,4232
|
6
6
|
rsclib/Phone.py,sha256=PbZOmISlBk0HUTnfFL0Cz5S2OfQInNJEGSkPQtmoo5U,5976
|
7
|
-
rsclib/Rational.py,sha256=mutxsDudWE6rFsCKdERm0HDziFAfLQsVJxkcYQfiKCc,6545
|
8
7
|
rsclib/TeX_CSV_Writer.py,sha256=UPR4p9Cto_2bl-EZPD8MMmrPC-oe-hnZpl3RJX_AsSo,4470
|
9
|
-
rsclib/Version.py,sha256=
|
8
|
+
rsclib/Version.py,sha256=zPRXo3hHkUH7mFsYiRjw13s0ACJQvdNBTBokBkRxSVo,15
|
10
9
|
rsclib/__init__.py,sha256=lrEKKeDSuco0mTnyIBBWwcFHNBfID1trqmaljQP6wS4,103
|
11
10
|
rsclib/ast_call.py,sha256=pmshDt3QDa0cis8q9LW1GwibZ4q208Wy86Dz4bPPwo4,42872
|
12
11
|
rsclib/ast_cdr.py,sha256=AnYR-E8HvBAsItbx90X2dnCizYdIFEVvoizRWX7m7hI,6509
|
@@ -21,17 +20,18 @@ rsclib/grepmime.py,sha256=AfilCKZkSDjsz9DWcoGwQlwPFEvfHIsvjIaCdTRDGtw,2291
|
|
21
20
|
rsclib/hexdump.py,sha256=k9nZf13ej0ubw31oaBcotw1ux2Uh05ikN_uyF7LZ9uw,5303
|
22
21
|
rsclib/inductance.py,sha256=mxyctNo40KrvFJim9zeWuZrtBt3QIc2RkVkUOVExtHQ,18943
|
23
22
|
rsclib/isdn.py,sha256=xMime2K7WSwnKnU5rddPepXk29CI8qnP88f3AVFs_00,30587
|
24
|
-
rsclib/iter_recipes.py,sha256=
|
23
|
+
rsclib/iter_recipes.py,sha256=P6MSbzdWlLZHkyaqS_6Pgnb1cnDHimadQ6FWQ45iY0A,6641
|
25
24
|
rsclib/lc_resonator.py,sha256=zfAlm5AsiAMNxNNzZ7p-RrIKr9J7sNwQjIP7PxyRn_I,1778
|
26
25
|
rsclib/nmap.py,sha256=Pdq08m2Lu1k2ae6DRQPgBDsjI65yxTGykDO7z5l4g1c,20872
|
27
26
|
rsclib/ocf.py,sha256=BYEegpoYyGSOPNxGY9RrUdrvHeOdEikwfum0SLdflmM,17926
|
28
27
|
rsclib/pycompat.py,sha256=T_VkN3tkBsxK-Ny4JWINeHFBXfeMHZP_2PfX3oQta40,3050
|
28
|
+
rsclib/rational.py,sha256=9wcMFRu4yQ3NGa-Y5wr5hW40OEUzrGM0erTRa3GEURA,6839
|
29
29
|
rsclib/sqlparser.py,sha256=121oYWWMRJdf0OyQn7633E1sFjPN28uJ-79YGwUCuBY,50686
|
30
30
|
rsclib/stateparser.py,sha256=49YQQ-hSZvo_ZRqmBk622EDmV87eM6JGmnNZQMbbc7U,7249
|
31
31
|
rsclib/timeout.py,sha256=NwnunkdUp-qeCA2eOe67f4FcRuOOnlOXEikcKQqNXC8,2086
|
32
32
|
rsclib/trafficshape.py,sha256=irtc2Roqx5wiD_dabgIqdEHiiLaYCptt1ZYohQwzedI,31827
|
33
|
-
rsclib-0.
|
34
|
-
rsclib-0.
|
35
|
-
rsclib-0.
|
36
|
-
rsclib-0.
|
37
|
-
rsclib-0.
|
33
|
+
rsclib-0.67.dist-info/METADATA,sha256=kH3_t_upuk6dlRERkwtXVWDtwksKfg2eWbaMgu8OZ2E,26736
|
34
|
+
rsclib-0.67.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
35
|
+
rsclib-0.67.dist-info/entry_points.txt,sha256=v_HBJjD2WMhJxIg-1oUJWZiY9_anclZGi_3VZmdr0Yk,153
|
36
|
+
rsclib-0.67.dist-info/top_level.txt,sha256=S-AmnZlxt4o-KeX8SAhAaqbUSB5wY327bkF-_p8YdCk,7
|
37
|
+
rsclib-0.67.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|