Profile

Cover photo
Jacob Zimmerman
Works at Collaborative Domestic Solutions Center
Attended University of Wisconsin-Whitewater
Lives in Wisconsin, United States
115 followers|568,359 views
AboutPostsCollections

Stream

 
Making Descriptors that act as specialized properties can be tricky, especially when it comes to storing the data the the property controls. I should know, I literally wrote the book. Looking at how other languages do it - especially Kotlin's Delegated Properties - I felt that Python could use a system that works more like that.

https://programmingideaswithjake.wordpress.com/2016/08/13/instance-level-properties-in-python/
10
Lie Ryan's profile photoJacob Zimmerman's profile photo
2 comments
 
That was my first instinct as well, but there are two problems with that:
1) A class can only have one metaclass, if it inherits from one class that uses just `type` as it's metaclass AND tries to apply this metaclass, it will fail. Due to this, I only use metaclasses when they're the only thing that will work.
2) I'm not actually sure if I COULD do it with a metaclass. Without inheriting from `object`, I wouldn't have the base implementations of the methods I need.

I admit, it certainly feels like a problem for metaclasses to solve, but if you can do it WITHOUT using metaclasses (and making it REALLY verbose or difficult to use), you probably shouldn't.
Add a comment...
 
Let's look at another potentially confusing part of Python's boolean system: the ability to string comparison operators.

https://programmingideaswithjake.wordpress.com/2016/07/23/string-python-comparisons-along/
4
Add a comment...

Jacob Zimmerman

Discussion  - 
 
Let's look at another potentially confusing part of Python's boolean system: the ability to string comparison operators.

https://programmingideaswithjake.wordpress.com/2016/07/23/string-python-comparisons-along/
10
Add a comment...

Jacob Zimmerman

Discussion  - 
 
It can be difficult to understand how the 'and' and 'or' operators really work. Let's look and see.

https://programmingideaswithjake.wordpress.com/2016/07/09/how-python-boolean-operators-work/
13
1
Tech Hiring's profile photo
 
awesome
Add a comment...

Communities

Jacob Zimmerman

Discussion  - 
 
Making Descriptors that act as specialized properties can be tricky, especially when it comes to storing the data the the property controls. I should know, I literally wrote the book. Looking at how other languages do it - especially Kotlin's Delegated Properties - I felt that Python could use a system that works more like that.

https://programmingideaswithjake.wordpress.com/2016/08/13/instance-level-properties-in-python/
5
Add a comment...

Jacob Zimmerman

Discussion  - 
 
Making Descriptors that act as specialized properties can be tricky, especially when it comes to storing the data the the property controls. I should know, I literally wrote the book. Looking at how other languages do it - especially Kotlin's Delegated Properties - I felt that Python could use a system that works more like that.

https://programmingideaswithjake.wordpress.com/2016/08/13/instance-level-properties-in-python/
1
Add a comment...
 
Let's look at another potentially confusing part of Python's boolean system: the ability to string comparison operators.

https://programmingideaswithjake.wordpress.com/2016/07/23/string-python-comparisons-along/
9
Add a comment...

Jacob Zimmerman

Discussion  - 
 
Let's look at another potentially confusing part of Python's boolean system: the ability to string comparison operators.

https://programmingideaswithjake.wordpress.com/2016/07/23/string-python-comparisons-along/
1
Add a comment...

Jacob Zimmerman

Discussion  - 
 
It can be difficult to understand how the 'and' and 'or' operators really work. Let's look and see.

https://programmingideaswithjake.wordpress.com/2016/07/09/how-python-boolean-operators-work/
1
AUX OX's profile photo
AUX OX
 
Really liked the table work references. Regulalrly, I'm only thinking about the output.
Add a comment...
 
It can be difficult to understand how the 'and' and 'or' operators really work. Let's look and see.

https://programmingideaswithjake.wordpress.com/2016/07/09/how-python-boolean-operators-work/
4
Add a comment...
Jacob's Collections
Communities
Story
Bragging rights
Writing for 2 blogs, and editing a friend's fiction blog.
Education
  • University of Wisconsin-Whitewater
    Management Computer Systems, 2006 - 2010
Basic Information
Gender
Male
Collections Jacob is following
Work
Employment
  • Collaborative Domestic Solutions Center
    Associate Developer I (computer programmer), 2013 - present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Wisconsin, United States