---
title: "Discussion on \"A Tale of Object-Oriented Programming: A Realistic Look at Python Interfaces (Part II)\" | Hashnode"
description: "Discussion on \"A Tale of Object-Oriented Programming: A Realistic Look at Python Interfaces (Part II)\". Implementing a better solution..."
url: "https://hashnode.com/posts/a-tale-of-object-oriented-programming-a-realistic-look-at-python-interfaces-part-ii/63d3d1124eb8e353a5b1387b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A Tale of Object-Oriented Programming: A Realistic Look at Python Interfaces (Part II)](https://albexl.hashnode.dev/a-tale-of-object-oriented-programming-a-realistic-look-at-python-interfaces-part-ii?utm_source=hashnode&utm_medium=feed)

Implementing a better solution...

Jan 27, 2023 · 10 min read · albexl.hashnode.dev  
Updated Mar 21, 2023  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#object-oriented-programming](https://hashnode.com/tag/object-oriented-programming)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Alberto Gonzalez](https://hashnode.com/@albeXL)

@albeXL · Gothenburg, Sweden

  
[View profile](https://hashnode.com/@albeXL)

Software Developer at doWhile | Computer Scientist | ICPC World Finalist | EN | ES

Computer Scientist from the University of Havana with experience in Software Development and a passion for Competitive Programming and Algorithms. Writing about the topics I know whenever I can. Coding in Python and C++ lately.

## Responses 2

Markdown supported · ⌘↵ to post

[Carlos R. González Jiménez](https://hashnode.com/@cranza)

[Jan 27, 2023](https://hashnode.com/posts/a-tale-of-object-oriented-programming-a-realistic-look-at-python-interfaces-part-ii/63d3d1124eb8e353a5b1387b/comment/63d3e5c9d9df8015cdfacc20)

Another important and extremely relevant aspect of the proposed solution is the possibility of extending the access verification process and making it more specific depending on the type of visitor. For example: take into account the age of the person or the visiting hours of the vehicle depending on the type or number of legs of an animal.

[Alberto Gonzalez](https://hashnode.com/@albeXL)

[Jan 27, 2023](https://hashnode.com/posts/a-tale-of-object-oriented-programming-a-realistic-look-at-python-interfaces-part-ii/63d3d1124eb8e353a5b1387b/comment/63d3e5c9d9df8015cdfacc20#reply-63d3fcc3facbb01d327bc9fe)

Definitely this solution allows much more flexibility on the verification details for every visitor class. And it feels more natural that the visitor is the one defining those specifications.

[Carlos R. González Jiménez](https://hashnode.com/@cranza)

[Jan 27, 2023](https://hashnode.com/posts/a-tale-of-object-oriented-programming-a-realistic-look-at-python-interfaces-part-ii/63d3d1124eb8e353a5b1387b/comment/63d3dc9dd9df8015cdfaca72)

An excellent and very clean solution to a fairly everyday problem. What I liked the most is the assignment of responsibilities to the classes derived from the interface, which in the initial solution appeared disconnected from each other.
