This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "pwo"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
authors = [
|
||||
{ name="Walter Oggioni", email="oggioni.walter@gmail.com" },
|
||||
]
|
||||
|
@@ -24,11 +24,10 @@ class Maybe(Generic[T]):
|
||||
|
||||
@property
|
||||
def value(self) -> T:
|
||||
value = self._value
|
||||
if not value:
|
||||
if self.is_empty:
|
||||
raise ValueError('Empty Maybe')
|
||||
else:
|
||||
return value
|
||||
return self._value
|
||||
|
||||
@property
|
||||
def is_present(self) -> bool:
|
||||
|
Reference in New Issue
Block a user