Python Forum
How to use Bunch data structure
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use Bunch data structure
#1
Hi All,
I'm trying to use Bunch data structure, and fail to find what import is needed in order to use it
I'm using Python 3.8
A complete working example will be greatly appreciated
any
Regards,
Moish
Reply
#2
What is a bunch? Where does it come from?
Reply
#3
It is not one of the standard libraries. You can install from PyPi.

https://pypi.org/project/bunch/

Description says bunch is a "A dot-accessible dictionary (a la JavaScript objects)". In other words you get a dictionary where you can add and access attributes using object.attribute instead of object['attribute'] if you want.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  a bunch of modules to import Skaperen 2 883 Nov-07-2022, 07:33 PM
Last Post: Gribouillis
  How can I add certain elements in this 2d data structure and calculate a mean TheOddCircle 3 1,543 May-27-2022, 09:09 AM
Last Post: paul18fr
  Appropriate data-structure / design for business-day relations (week/month-wise) sx999 2 2,792 Apr-23-2021, 08:09 AM
Last Post: sx999
  what data structure to use? Winfried 4 2,815 Mar-16-2021, 12:11 PM
Last Post: buran
  Yahoo_fin, Pandas: how to convert data table structure in csv file detlefschmitt 14 7,710 Feb-15-2021, 12:58 PM
Last Post: detlefschmitt
  Correct data structure for this problem Wigi 13 4,615 Oct-09-2020, 11:09 AM
Last Post: buran
  difficulties to chage json data structure using json module in python Sibdar 1 2,079 Apr-03-2020, 06:47 PM
Last Post: micseydel
  File system representation in a data structure Alfalfa 1 2,060 Dec-18-2019, 01:56 AM
Last Post: Alfalfa
  Custom data structure icm63 2 2,529 Mar-27-2019, 02:40 AM
Last Post: icm63
  Nested Data structure question arjunfen 7 4,250 Feb-22-2019, 02:18 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