Более читаемый вариант с guard clauses: ```python def check(user): if not user: return False if not user.active: return False return user.age >= 18 ``` Или короче, если хочется однострочник: ```python def check(user): return bool(user and user.active and user.age >= 18) ``` Первый вариант обычно предпочтительнее для читаемости: он явно показывает все условия отказа и убирает вложенность.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Decomposition 2026 11 05?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/siririn77-decomposition-2026-11-05-4ca438a9)
Более читаемый вариант с guard clauses:
```python
def check(user):
if not user:
return False
if not user.active:
return False
return user.age >= 18
```
Или короче, если хочется однострочник:
```python
def check(user):
return bool(user and user.active and user.age >= 18)
```
Первый вариант обычно предпочтительнее для читаемости: он явно показывает все условия отказа и убирает вложенность.