Profile

Cover photo
The Digital Cat
52 followers|102,146 views
AboutPostsPhotosVideos

Stream

 
1
Add a comment...
 
 
Published on: Oct 14th, 2014 Tags: decorators, metaclasses, oop, python, python3 Posted by Leonardo Giordani Abstract While introducing people to …
2 comments on original post
9
3
Lewis Fogden's profile photoJorge Devoto's profile photoJavier Novoa Cataño's profile photoNoureddine Ayachi's profile photo
 
Now it makes sense... That is a really clean and powerful tool.
Add a comment...
 
 
Published on: Sep 4th, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani Previous post Python 3 OOP Part 5 - Metaclasses The Inspection …
View original post
10
1
michael petychakis's profile photoThe Digital Cat's profile photoPython's profile photo
2 comments
 
Thank you! Glad to know that you enjoyed it.
Add a comment...

The Digital Cat

Shared publicly  - 
 
Published on: Sep 1st, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani Previous post Python 3 OOP Part 4 - Polymorphism The Type …
1
2
The Digital Cat's profile photoLeonardo Giordani's profile photo
Add a comment...
 
 
Published on: Aug 21st, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani Previous post Python 3 OOP Part 3 - Delegation: composition and …
View original post
3
1
Leonardo Giordani's profile photo
Add a comment...
 
This series of posts wants to introduce the reader to the Python 3 implementation of Object Oriented Programming concepts. The content of this and the following posts will not be completely different from that of the previous “OOP Concepts in Python 2.x” series, however. The reason is that while some of the internal structures change a lot, the global philosophy doesn’t, being Python 3 an evolution of Python 2 and not a new language.

So I chose to split the previous series and to adapt the content to Python 3 instead of posting a mere list of corrections. I find this way to be more useful for new readers, that otherwise sould be forced to read the previoous series.

#Python #OOP #Python3  
Published on: Aug 20th, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani About this series Object-oriented programming (OOP) has been the …
1
3
Leonardo Giordani's profile photoNoureddine Ayachi's profile photo
Add a comment...
In their circles
24 people
Have them in circles
52 people
Phil Wright's profile photo
Alexander Zaytsev's profile photo
Nur Adhi Nugroho's profile photo
Panayiotis Tzagkarakis's profile photo
Sean Liu's profile photo
reegan A Reegan's profile photo
Андрей Нестеров's profile photo
Alexander Sidorov's profile photo
Petr Šebek's profile photo

The Digital Cat

Shared publicly  - 
 
How to deal with default arguments in Python functions and methods
1
2
The Digital Cat's profile photoLeonardo Giordani's profile photo
Add a comment...

The Digital Cat

Shared publicly  - 
 
Published on: Oct 14th, 2014 Tags: decorators, metaclasses, oop, python, python3 Posted by Leonardo Giordani Abstract While introducing people to …
3
5
Leonardo Giordani's profile photoJorge Devoto's profile photoJavier Novoa Cataño's profile photoNoureddine Ayachi's profile photo
2 comments
 
Hi! Glad to know that you found some help in my post.
Indeed you are right, that is a useless line of code, I'm going to fix it.

There is a caveat, however. In Python strings are immutable, so there is no harm in changing a string passed as an argument to a function. If the argument were a list, for example, changing it would result in changing the actual variable passed to the function (Python works with references).

Obviously just assigning the variable to a local one does not suffice, since the reference is always the same, so the line you spotted would be wrong in this latter case too. When filtering mutable types better to consider copying the incoming object if keeping its original value is mandatory.

Thanks!
Add a comment...

The Digital Cat

Shared publicly  - 
 
Published on: Sep 4th, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani Previous post Python 3 OOP Part 5 - Metaclasses The Inspection …
1
5
Davinir F Campos Jr's profile photoMarcin Gierdalski's profile photo
Add a comment...
 
 
Published on: Sep 1st, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani Previous post Python 3 OOP Part 4 - Polymorphism The Type …
View original post
1
Add a comment...

The Digital Cat

Shared publicly  - 
 
Published on: Aug 21st, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani Previous post Python 3 OOP Part 3 - Delegation: composition and …
2
2
The Digital Cat's profile photoLeonardo Giordani's profile photo
Add a comment...
 
 
This series of posts wants to introduce the reader to the Python 3 implementation of Object Oriented Programming concepts. The content of this and the following posts will not be completely different from that of the previous “OOP Concepts in Python 2.x” series, however. The reason is that while some of the internal structures change a lot, the global philosophy doesn’t, being Python 3 an evolution of Python 2 and not a new language.

So I chose to split the previous series and to adapt the content to Python 3 instead of posting a mere list of corrections. I find this way to be more useful for new readers, that otherwise sould be forced to read the previoous series.

#Python #OOP #Python3  
Published on: Aug 20th, 2014 Tags: oop, python, python3 Posted by Leonardo Giordani About this series Object-oriented programming (OOP) has been the …
View original post
2
1
Noureddine Ayachi's profile photo
Add a comment...
People
In their circles
24 people
Have them in circles
52 people
Phil Wright's profile photo
Alexander Zaytsev's profile photo
Nur Adhi Nugroho's profile photo
Panayiotis Tzagkarakis's profile photo
Sean Liu's profile photo
reegan A Reegan's profile photo
Андрей Нестеров's profile photo
Alexander Sidorov's profile photo
Petr Šebek's profile photo
Links
Story
Tagline
Learning is understanding and understanding is asking why and how
Introduction
Cats are curious animals: so the title implies this is blog about curiosity in the digital world.

Llearning is not a matter of procedures. Learning is understanding and understanding is asking why and how.