listclasses 1.0.1__tar.gz → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listclasses
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A simple decorator to make custom sequence types
5
5
  Description-Content-Type: text/markdown
6
6
  Dynamic: description
@@ -13,13 +13,13 @@ type-safe, and highly customizable custom sequence types
13
13
 
14
14
  # Features:
15
15
 
16
- Type Safety: Enforce strict data types for sequence items
17
- Length Constraints: Define fixed-size or dynamic sequences
18
- Immutability: Easily create read-only (frozen) collections
19
- Rich API: Seamlessly integrates with built-in functions (len(), repr(), iteration, slicing)
20
- Copy Support: Native support for shallow and deep copying
21
- Pretty Printing: Built-in methods for clean text formatting out of the box
22
- Installation: Add the listclass decorator code directly to your project
16
+ - Type Safety: Enforce strict data types for sequence items
17
+ - Length Constraints: Define fixed-size or dynamic sequences
18
+ - Immutability: Easily create read-only (frozen) collections
19
+ - Rich API: Seamlessly integrates with built-in functions (len(), repr(), iteration, slicing)
20
+ - Copy Support: Native support for shallow and deep copying
21
+ - Pretty Printing: Built-in methods for clean text formatting out of the box
22
+ - Installation: Add the listclass decorator code directly to your project
23
23
 
24
24
  ```commandline
25
25
  pip install listclasses
@@ -119,9 +119,9 @@ todos = TodoList("Buy milk", "Clean room", "Code Python")
119
119
  # Dotted list format
120
120
  todos.print_dotted()
121
121
  # Output:
122
- # · Buy milk
123
- # · Clean room
124
- # · Code Python
122
+ # - Buy milk
123
+ # - Clean room
124
+ # - Code Python
125
125
 
126
126
  # Numbered list format
127
127
  todos.print_numbered()
@@ -144,7 +144,7 @@ todos.print_numbered()
144
144
 
145
145
  Depending on configuration (frozen and len), instances support standard list operations:
146
146
 
147
- Access: __getitem__, __iter__, __contains__, count(), index()
148
- Mutation (Dynamic only): append(), pop(), clear(), insert(), __delitem__
149
- Ordering (Mutable only): sort(), reverse()
150
- Math: __add__ (+), __iadd__ (+=)
147
+ - Access: `__getitem__`, `__iter__`, `__contains__`, `count()`, `index()`
148
+ - Mutation (Dynamic only): `append()`, `pop()`, `clear()`, `insert()`, `__delitem__`
149
+ - Ordering (Mutable only): `sort()`, `reverse()`
150
+ - Math: `__add__`, `__iadd__`
@@ -4,13 +4,13 @@ type-safe, and highly customizable custom sequence types
4
4
 
5
5
  # Features:
6
6
 
7
- Type Safety: Enforce strict data types for sequence items
8
- Length Constraints: Define fixed-size or dynamic sequences
9
- Immutability: Easily create read-only (frozen) collections
10
- Rich API: Seamlessly integrates with built-in functions (len(), repr(), iteration, slicing)
11
- Copy Support: Native support for shallow and deep copying
12
- Pretty Printing: Built-in methods for clean text formatting out of the box
13
- Installation: Add the listclass decorator code directly to your project
7
+ - Type Safety: Enforce strict data types for sequence items
8
+ - Length Constraints: Define fixed-size or dynamic sequences
9
+ - Immutability: Easily create read-only (frozen) collections
10
+ - Rich API: Seamlessly integrates with built-in functions (len(), repr(), iteration, slicing)
11
+ - Copy Support: Native support for shallow and deep copying
12
+ - Pretty Printing: Built-in methods for clean text formatting out of the box
13
+ - Installation: Add the listclass decorator code directly to your project
14
14
 
15
15
  ```commandline
16
16
  pip install listclasses
@@ -110,9 +110,9 @@ todos = TodoList("Buy milk", "Clean room", "Code Python")
110
110
  # Dotted list format
111
111
  todos.print_dotted()
112
112
  # Output:
113
- # · Buy milk
114
- # · Clean room
115
- # · Code Python
113
+ # - Buy milk
114
+ # - Clean room
115
+ # - Code Python
116
116
 
117
117
  # Numbered list format
118
118
  todos.print_numbered()
@@ -135,7 +135,7 @@ todos.print_numbered()
135
135
 
136
136
  Depending on configuration (frozen and len), instances support standard list operations:
137
137
 
138
- Access: __getitem__, __iter__, __contains__, count(), index()
139
- Mutation (Dynamic only): append(), pop(), clear(), insert(), __delitem__
140
- Ordering (Mutable only): sort(), reverse()
141
- Math: __add__ (+), __iadd__ (+=)
138
+ - Access: `__getitem__`, `__iter__`, `__contains__`, `count()`, `index()`
139
+ - Mutation (Dynamic only): `append()`, `pop()`, `clear()`, `insert()`, `__delitem__`
140
+ - Ordering (Mutable only): `sort()`, `reverse()`
141
+ - Math: `__add__`, `__iadd__`
@@ -76,7 +76,7 @@ def listclass(cls = None, *, len: int = 0, frozen: bool = False, type: type = an
76
76
  new_instance.__dict__[k] = deepcopy(v, memo)
77
77
  return new_instance
78
78
 
79
- def print_dotted(self) -> None:
79
+ def print_dotted(self, dot: str='·') -> None:
80
80
  """
81
81
  Prints a list in a format:
82
82
  · list[0]\n
@@ -84,7 +84,7 @@ def listclass(cls = None, *, len: int = 0, frozen: bool = False, type: type = an
84
84
  · list[2]
85
85
  """
86
86
  for item in self._items:
87
- print('·', item)
87
+ print(dot, item)
88
88
 
89
89
  def print_numbered(self) -> None:
90
90
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listclasses
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A simple decorator to make custom sequence types
5
5
  Description-Content-Type: text/markdown
6
6
  Dynamic: description
@@ -13,13 +13,13 @@ type-safe, and highly customizable custom sequence types
13
13
 
14
14
  # Features:
15
15
 
16
- Type Safety: Enforce strict data types for sequence items
17
- Length Constraints: Define fixed-size or dynamic sequences
18
- Immutability: Easily create read-only (frozen) collections
19
- Rich API: Seamlessly integrates with built-in functions (len(), repr(), iteration, slicing)
20
- Copy Support: Native support for shallow and deep copying
21
- Pretty Printing: Built-in methods for clean text formatting out of the box
22
- Installation: Add the listclass decorator code directly to your project
16
+ - Type Safety: Enforce strict data types for sequence items
17
+ - Length Constraints: Define fixed-size or dynamic sequences
18
+ - Immutability: Easily create read-only (frozen) collections
19
+ - Rich API: Seamlessly integrates with built-in functions (len(), repr(), iteration, slicing)
20
+ - Copy Support: Native support for shallow and deep copying
21
+ - Pretty Printing: Built-in methods for clean text formatting out of the box
22
+ - Installation: Add the listclass decorator code directly to your project
23
23
 
24
24
  ```commandline
25
25
  pip install listclasses
@@ -119,9 +119,9 @@ todos = TodoList("Buy milk", "Clean room", "Code Python")
119
119
  # Dotted list format
120
120
  todos.print_dotted()
121
121
  # Output:
122
- # · Buy milk
123
- # · Clean room
124
- # · Code Python
122
+ # - Buy milk
123
+ # - Clean room
124
+ # - Code Python
125
125
 
126
126
  # Numbered list format
127
127
  todos.print_numbered()
@@ -144,7 +144,7 @@ todos.print_numbered()
144
144
 
145
145
  Depending on configuration (frozen and len), instances support standard list operations:
146
146
 
147
- Access: __getitem__, __iter__, __contains__, count(), index()
148
- Mutation (Dynamic only): append(), pop(), clear(), insert(), __delitem__
149
- Ordering (Mutable only): sort(), reverse()
150
- Math: __add__ (+), __iadd__ (+=)
147
+ - Access: `__getitem__`, `__iter__`, `__contains__`, `count()`, `index()`
148
+ - Mutation (Dynamic only): `append()`, `pop()`, `clear()`, `insert()`, `__delitem__`
149
+ - Ordering (Mutable only): `sort()`, `reverse()`
150
+ - Math: `__add__`, `__iadd__`
@@ -5,7 +5,7 @@ with open('README.md', 'r') as file:
5
5
 
6
6
  setup(
7
7
  name='listclasses',
8
- version='1.0.1',
8
+ version='1.0.2',
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
 
File without changes