Skip to Content
Python for Finance
book

Python for Finance

by Yves Hilpisch
December 2014
Intermediate to advanced
606 pages
13h 46m
English
O'Reilly Media, Inc.
Content preview from Python for Finance

Chapter 13. Object Orientation and Graphical User Interfaces

First, solve the problem. Then, write the code.

Jon Johnson

Object orientation has its fans and critics. Referring to the quote above, object-oriented implementation styles might provide the most benefit when they are applied by programmers who really understand the problem at hand and when there is much to gain from abstraction and generalization. On the other hand, if you do not know what exactly to do, a different, more interactive and exploratory programming style, like procedural programming, might be a better choice.

In this chapter, we do not want to discuss the risks and merits of using object orientation. We take it for granted that this approach has its place when it comes to the development of more complex financial applications (cf. the project implemented in Part III of the book) and that it brings along a number of measurable benefits in these cases. When it comes to building graphical user interfaces (GUIs), object orientation in general is a conditio sine qua non.

Therefore, we combine the two topics in this chapter and introduce first fundamental concepts of Python classes and objects. Equipped with this knowledge, it is much easier to introduce the development of GUIs.

Object Orientation

Wikipedia provides the following definition for object-oriented programming:

Object-oriented programming (OOP) is a programming paradigm that represents concepts as “objects” that have data fields (attributes that describe ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Python for Finance

Hands-On Python for Finance

Matthew Macarty

Publisher Resources

ISBN: 9781491945360Errata