Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
class and runtime
#2
You can add methods to a class or replace existing methods with different code during runtime. I embed an interactive python interpreter in some of the systems I make. During debugging and checkout I can open a console to the interpreter a type python code. Sometimes I modify the code for a class so a method acts differently when called.

Modifying a class after it is included is rare, but common enough that there is a term for it: monkey patching.
akbarza likes this post
Reply


Messages In This Thread
class and runtime - by akbarza - Mar-15-2024, 08:02 AM
RE: class and runtime - by deanhystad - Mar-15-2024, 08:35 AM
RE: class and runtime - by DeaD_EyE - Mar-15-2024, 10:25 AM
RE: class and runtime - by akbarza - Mar-16-2024, 11:34 AM
RE: class and runtime - by deanhystad - Mar-16-2024, 01:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  painfully slow runtime when handling data dadazhu 3 1,019 Jan-20-2023, 07:11 PM
Last Post: snippsat
  Big O runtime nested for loop and append yarinsh 4 1,447 Dec-31-2022, 11:50 PM
Last Post: stevendaprano
  Reducing runtime memory usage in Cpython interpreter david_the_graower 2 2,283 Oct-18-2021, 09:56 PM
Last Post: david_the_graower
  Object reference in Dict - not resolved at runtime benthomson 2 1,873 Apr-02-2020, 08:50 AM
Last Post: benthomson
  PyCharm asking for VC++ runtime 14.0 whereas I have already installed VC++ 19.0 SarmadiRizvi 1 1,886 Apr-02-2020, 06:17 AM
Last Post: snippsat
  EOFError: EOF when reading a line - Runtime Error RavCOder 6 9,747 Sep-27-2019, 12:22 PM
Last Post: RavCOder
  Different runtime programs mhvozdesky 1 53,098 Oct-24-2018, 02:50 PM
Last Post: ichabod801
  PyDev package install/download at runtime user2103 0 2,518 Jan-30-2018, 08:39 AM
Last Post: user2103
  Question on runtime and improving nested for loops ackmondual 1 3,105 Jun-13-2017, 11:11 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020