Implement a few more specialty remote newsgroup types
This commit is contained in:
parent
329c695131
commit
1a881145f9
1 changed files with 24 additions and 1 deletions
|
@ -2,10 +2,33 @@ class RemoteException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class RemoteNewsgroup():
|
class RemoteNewsgroup():
|
||||||
|
__slots__ = 'name',
|
||||||
|
|
||||||
|
def __init__(self, name: str):
|
||||||
|
self.name: str = name
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
class RemoteNewsgroupDescription(RemoteNewsgroup):
|
||||||
|
__slots__ = 'name', 'description',
|
||||||
|
|
||||||
|
def __init__(self, name: str, description: str):
|
||||||
|
super().__init__(name)
|
||||||
|
|
||||||
|
self.description: str = description
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "%s %s" % (
|
||||||
|
self.name, self.description
|
||||||
|
)
|
||||||
|
|
||||||
|
class RemoteNewsgroupOverview(RemoteNewsgroup):
|
||||||
__slots__ = 'name', 'low', 'high', 'post',
|
__slots__ = 'name', 'low', 'high', 'post',
|
||||||
|
|
||||||
def __init__(self, name: str, low: int, high: int, post: bool):
|
def __init__(self, name: str, low: int, high: int, post: bool):
|
||||||
self.name: str = name
|
super().__init__(name)
|
||||||
|
|
||||||
self.low: int = low
|
self.low: int = low
|
||||||
self.high: int = high
|
self.high: int = high
|
||||||
self.post: bool = post
|
self.post: bool = post
|
||||||
|
|
Loading…
Add table
Reference in a new issue