Python Forum
print all method and property of list object
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print all method and property of list object
#4
engmoh Wrote:can i replace "i" to value of "i" immediately without getattr() function
No. There is no special syntax to access an attribute which name is a variable's value. You may regret this but it's one of the many things that make the great consistency of the language and therefore its success. Python's designers prefer function calls over exotic syntactic constructs.
Reply


Messages In This Thread
RE: print all method and property of list object - by Gribouillis - Oct-26-2019, 05:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you get Python to print just one value in a list? 357mag 3 1,054 May-17-2023, 09:52 PM
Last Post: rob101
  add object and name in list 3lnyn0 4 1,329 Nov-24-2022, 07:33 PM
Last Post: buran
  SystemError: <method-wrapper '__getattribute__' of EnumMeta object sciloop 4 1,559 Jul-23-2022, 07:57 PM
Last Post: sciloop
  AttributeError: 'list' object has no attribute 'upper' Anldra12 4 4,989 Apr-27-2022, 09:27 AM
Last Post: Anldra12
  Print List to Terminal DaveG 2 1,470 Apr-02-2022, 11:25 AM
Last Post: perfringo
  Subclass initialized property used in parent class method. Is it bad coding practice? saavedra29 5 1,876 Feb-07-2022, 07:29 PM
Last Post: saavedra29
  AttributeError: 'list' object has no attribute 'values' ilknurg 4 15,163 Jan-19-2022, 08:33 AM
Last Post: menator01
  Question about List.reverse() method tomliuwhite 1 1,396 Dec-07-2021, 08:20 AM
Last Post: ndc85430
  ABC Module and @property decorator, Pythonic Way? muzikman 21 5,852 Aug-18-2021, 06:08 PM
Last Post: muzikman
  @property vs __set__ / __get__ and __setattr__ / __getattr__ okhajut 1 3,390 Jun-15-2021, 03:48 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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