istr-python 1.1.0__tar.gz → 1.1.2__tar.gz
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.
- {istr_python-1.1.0 → istr_python-1.1.2}/PKG-INFO +9 -3
- {istr_python-1.1.0 → istr_python-1.1.2}/README.md +8 -2
- {istr_python-1.1.0 → istr_python-1.1.2}/istr/istr.py +2 -2
- {istr_python-1.1.0 → istr_python-1.1.2}/istr_python.egg-info/PKG-INFO +9 -3
- {istr_python-1.1.0 → istr_python-1.1.2}/pyproject.toml +1 -1
- {istr_python-1.1.0 → istr_python-1.1.2}/tests/test_istr.py +5 -5
- {istr_python-1.1.0 → istr_python-1.1.2}/istr/LICENSE.txt +0 -0
- {istr_python-1.1.0 → istr_python-1.1.2}/istr/__init__.py +0 -0
- {istr_python-1.1.0 → istr_python-1.1.2}/istr_python.egg-info/SOURCES.txt +0 -0
- {istr_python-1.1.0 → istr_python-1.1.2}/istr_python.egg-info/dependency_links.txt +0 -0
- {istr_python-1.1.0 → istr_python-1.1.2}/istr_python.egg-info/top_level.txt +0 -0
- {istr_python-1.1.0 → istr_python-1.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: istr-python
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: istr - strings you can count on
|
|
5
5
|
Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/salabim/istr
|
|
@@ -50,11 +50,11 @@ And the module is a demonstration of extending a class (str) with extra and chan
|
|
|
50
50
|
### Installation
|
|
51
51
|
Installing istr with pip is easy.
|
|
52
52
|
```
|
|
53
|
-
|
|
53
|
+
pip install istr-python
|
|
54
54
|
```
|
|
55
55
|
or when you want to upgrade,
|
|
56
56
|
```
|
|
57
|
-
|
|
57
|
+
pip install istr-python --upgrade
|
|
58
58
|
```
|
|
59
59
|
Alternatively, istr.py can be just copied into you current work directory from GitHub (https://github.com/salabim/istr).
|
|
60
60
|
|
|
@@ -69,6 +69,12 @@ Just start with
|
|
|
69
69
|
import istr
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
or the more conventional, more verbose:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
from istr import istr
|
|
76
|
+
```
|
|
77
|
+
|
|
72
78
|
#### Use istr as int
|
|
73
79
|
|
|
74
80
|
We can define an istr:
|
|
@@ -37,11 +37,11 @@ And the module is a demonstration of extending a class (str) with extra and chan
|
|
|
37
37
|
### Installation
|
|
38
38
|
Installing istr with pip is easy.
|
|
39
39
|
```
|
|
40
|
-
|
|
40
|
+
pip install istr-python
|
|
41
41
|
```
|
|
42
42
|
or when you want to upgrade,
|
|
43
43
|
```
|
|
44
|
-
|
|
44
|
+
pip install istr-python --upgrade
|
|
45
45
|
```
|
|
46
46
|
Alternatively, istr.py can be just copied into you current work directory from GitHub (https://github.com/salabim/istr).
|
|
47
47
|
|
|
@@ -56,6 +56,12 @@ Just start with
|
|
|
56
56
|
import istr
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
or the more conventional, more verbose:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
from istr import istr
|
|
63
|
+
```
|
|
64
|
+
|
|
59
65
|
#### Use istr as int
|
|
60
66
|
|
|
61
67
|
We can define an istr:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# |_||___/ \__||_|
|
|
6
6
|
# strings you can count on
|
|
7
7
|
|
|
8
|
-
__version__ = "1.1.
|
|
8
|
+
__version__ = "1.1.2"
|
|
9
9
|
import functools
|
|
10
10
|
import math
|
|
11
11
|
import itertools
|
|
@@ -616,7 +616,7 @@ class istrModule(types.ModuleType):
|
|
|
616
616
|
def __getattr__(self, item,):
|
|
617
617
|
return getattr(istr,item)
|
|
618
618
|
|
|
619
|
-
sys.modules[
|
|
619
|
+
sys.modules["istr"].__class__ = istrModule
|
|
620
620
|
|
|
621
621
|
if __name__ == "__main__":
|
|
622
622
|
main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: istr-python
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: istr - strings you can count on
|
|
5
5
|
Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/salabim/istr
|
|
@@ -50,11 +50,11 @@ And the module is a demonstration of extending a class (str) with extra and chan
|
|
|
50
50
|
### Installation
|
|
51
51
|
Installing istr with pip is easy.
|
|
52
52
|
```
|
|
53
|
-
|
|
53
|
+
pip install istr-python
|
|
54
54
|
```
|
|
55
55
|
or when you want to upgrade,
|
|
56
56
|
```
|
|
57
|
-
|
|
57
|
+
pip install istr-python --upgrade
|
|
58
58
|
```
|
|
59
59
|
Alternatively, istr.py can be just copied into you current work directory from GitHub (https://github.com/salabim/istr).
|
|
60
60
|
|
|
@@ -69,6 +69,12 @@ Just start with
|
|
|
69
69
|
import istr
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
or the more conventional, more verbose:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
from istr import istr
|
|
76
|
+
```
|
|
77
|
+
|
|
72
78
|
#### Use istr as int
|
|
73
79
|
|
|
74
80
|
We can define an istr:
|
|
@@ -12,7 +12,7 @@ if __name__ == "__main__": # to make the tests run without the pytest cli
|
|
|
12
12
|
|
|
13
13
|
import pytest
|
|
14
14
|
|
|
15
|
-
import istr
|
|
15
|
+
from istr import istr
|
|
16
16
|
|
|
17
17
|
istr.equals = lambda self, other: type(self) == type(other) and (str(self) == str(other))
|
|
18
18
|
# this method tests whether self and other are exactly the same
|
|
@@ -358,17 +358,17 @@ def test_join():
|
|
|
358
358
|
s = istr("").join(("4", "5", "6"))
|
|
359
359
|
assert s == "456"
|
|
360
360
|
assert s == 456
|
|
361
|
-
assert type(s) == istr
|
|
361
|
+
assert type(s) == istr
|
|
362
362
|
|
|
363
363
|
s = istr("").join(istr(("4", "5", "6")))
|
|
364
364
|
assert s == "456"
|
|
365
365
|
assert s == 456
|
|
366
|
-
assert type(s) == istr
|
|
366
|
+
assert type(s) == istr
|
|
367
367
|
|
|
368
368
|
s = istr("").join(istr(("", "", "6")))
|
|
369
369
|
assert s == "6"
|
|
370
370
|
assert s == 6
|
|
371
|
-
assert type(s) == istr
|
|
371
|
+
assert type(s) == istr
|
|
372
372
|
|
|
373
373
|
|
|
374
374
|
def test_or():
|
|
@@ -677,7 +677,7 @@ def test_all_distinct():
|
|
|
677
677
|
|
|
678
678
|
|
|
679
679
|
def test_subclassing():
|
|
680
|
-
class jstr(istr
|
|
680
|
+
class jstr(istr): ...
|
|
681
681
|
|
|
682
682
|
assert jstr(5).equals(jstr(5))
|
|
683
683
|
assert repr(jstr(*range(3))) == "(jstr('0'), jstr('1'), jstr('2'))"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|