jyotisham / jyotisha

Python tools for the astronomical / astrological vedAnga of Hindus
MIT License
88 stars 53 forks source link

dictionary for kaalas? #61

Closed karthikraman closed 3 years ago

karthikraman commented 3 years ago

Instead of DayLengthBasedPeriods.braahma etc., can it be part of a dictionary? DayLengthBasedPeriods.kaala['braahma']? What is a better implementation?

I was thinking of adding more divisions, muhuurta names etc.

vvasuki commented 3 years ago

Better design is to avoid string literals - "braahma" etc. to the maximum possible extant. This makes coding tools' jobs much easier when it comes to refactoring etc.. Hence, periods.braahma is better than periods["braahma"] You can add more divisions directly into DayLengthBasedPeriods.

(Plz close this thread once resolved.)