Inspecting object states and understanding their properties often requires tedious setup of print statements or frequent context switching between code and documentation.
With WAT, you can quickly examine an object’s type, formatted value, variables, methods, parent types, signature, and documentation – all in one view.
To use WAT, simply prepend wat/
to any object you wish to inspect.
import wat
import datetime
wat/datetime.datetime.now()
str: 2024-08-12 18:12:46.949190
repr: datetime.datetime(2024, 8, 12, 18, 12, 46, 949190)
type: datetime.datetime
parents: datetime.date
Public attributes:
day: int = 12
fold: int = 0
hour: int = 18
max: datetime.datetime = 9999-12-31 23:59:59.999999
microsecond: int = 949190
min: datetime.datetime = 0001-01-01 00:00:00
minute: int = 12
month: int = 8
resolution: datetime.timedelta = 0:00:00.000001
second: int = 46
tzinfo: NoneType = None
year: int = 2024
def astimezone(…) # tz -> convert to local time in new timezone tz
def combine(…) # date, time -> datetime with same date and time fields
def ctime(…) # Return ctime() style string.
def date(…) # Return date object with same year, month and day.
def dst(…) # Return self.tzinfo.dst(self).
def fromisocalendar(…) # int, int, int -> Construct a date from the ISO year, week number and weekday.…
def fromisoformat(…) # string -> datetime from a string in most ISO 8601 formats
def fromordinal(…) # int -> date corresponding to a proleptic Gregorian ordinal.
def fromtimestamp(…) # timestamp[, tz] -> tz's local time from POSIX timestamp.
def isocalendar(…) # Return a named tuple containing ISO year, week number, and weekday.
def isoformat(…) # [sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].…
def isoweekday(…) # Return the day of the week represented by the date.…
def now(tz=None) # Returns new datetime object representing current time local to tz.…
def replace(…) # Return datetime with new specified fields.
def strftime(…) # format -> strftime() style string.
def strptime(…) # string, format -> new datetime parsed from a string (like time.strptime()).
def time(…) # Return time object with same time but with tzinfo=None.
def timestamp(…) # Return POSIX timestamp as float.
def timetuple(…) # Return time tuple, compatible with time.localtime().
def timetz(…) # Return time object with same time and tzinfo.
def today(…) # Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
def toordinal(…) # Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
def tzname(…) # Return self.tzinfo.tzname(self).
def utcfromtimestamp(…) # Construct a naive UTC datetime from a POSIX timestamp.
def utcnow(…) # Return a new datetime representing UTC day and time.
def utcoffset(…) # Return self.tzinfo.utcoffset(self).
def utctimetuple(…) # Return UTC time tuple, compatible with time.localtime().
def weekday(…) # Return the day of the week represented by the date.…