My Pet Python Kata

Eclipse Collections Pet Kata on GitHub (left) : Python implementation of Person class from Pet Kata

A time to learn Python

Why learn Python?

The Domain

PetType Enum
Pet Class
Person class

What I learned in the domain classes?

The Tests in the Kata

PetDomainForKata

Test data is a list of people with their pets and ages

Exercise 1 Test

Transforming and filtering lists using map and filter

Exercise 2 Test

Using any, all, sum, list and filter to complete tests in exercise 2
Learning how to flatten a persons pet types using chain and map

Exercise 3 Test

Implementing countByEach, groupBy and groupByEach in Python

Exercise 4 Test

Calculating the age statistics for Pets with min, max, sum and median
Joining strings, most common, median

Lessons Learned

--

--

--

Java Champion. Creator of the Eclipse Collections OSS Java library (http://www.eclipse.org/collections/). Inspired by Smalltalk. Opinions are my own.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Software QA Concepts applied to Allergy Testing

Sunday is Immutable

Create and Distribute Custom Microservice Templates

How do I solve complex problems?

Discovering Google Cloud Platform with Next ’18

Optimizing Images in Webpages

Automated launching Apache Web-server using Jenkins …

Launching an EC2 instance with an apache web server

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Donald Raab

Donald Raab

Java Champion. Creator of the Eclipse Collections OSS Java library (http://www.eclipse.org/collections/). Inspired by Smalltalk. Opinions are my own.

More from Medium

From Python To Java (Part 4) — Lists (Python) VS ArrayLists (Java)

Java vs Python: A Crucial Difference Between Both Languages

How slow Python is?

Learning C++ using Google Colab