Python Forum
Tree insertion and variable referencing
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tree insertion and variable referencing
#3
def insert(self, val, root='self'):[b][/b]

Clever - I didn't know you can do that. Assign self as default argument as a string.
Reply


Messages In This Thread
RE: Tree insertion and variable referencing - by hshivaraj - Dec-10-2017, 04:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  name 'lblstatus' is not defined when referencing a label KatManDEW 4 1,604 Apr-21-2022, 12:33 PM
Last Post: KatManDEW
  Dictionary Referencing nickdavis2017 1 1,634 Nov-20-2021, 06:24 PM
Last Post: deanhystad
  Referencing string names in df to outside variables illmattic 1 1,392 Nov-16-2021, 12:47 PM
Last Post: jefsummers
  Amortized analysis: Insertion in a list quazirfan 1 1,381 Sep-27-2021, 02:06 AM
Last Post: deanhystad
  Referencing a fixed cell Mark17 2 2,098 Dec-17-2020, 07:14 PM
Last Post: Mark17
  Insertion sort algorithm courtesy of YouTuber Joe James Drone4four 3 2,225 Dec-07-2020, 02:11 PM
Last Post: perfringo
Sad need help in referencing a list n00bdev 2 1,868 Nov-01-2020, 12:06 PM
Last Post: buran
  Issue referencing new instance from other class nanok66 3 2,264 Jul-31-2020, 02:07 AM
Last Post: nanok66
  referencing another method in a class Skaperen 6 2,710 Jul-02-2020, 04:30 AM
Last Post: Skaperen
  insertion sort viku361 1 1,958 Apr-20-2020, 01:47 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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