You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wiki says that sortby behaviour can be swich off by setting it to None:
The behaviour will persist until you turn it off:
x.sortby = None
But this raises an error:
In [57]: x.sortby = None
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-57-8471354fb9c4> in <module>()
----> 1 x.sortby = None
/usr/lib/python2.7/site-packages/prettytable.pyc in _set_sortby(self, val)
373 return self._sortby
374 def _set_sortby(self, val):
--> 375 self._validate_option("sortby", val)
376 self._sortby = val
377 sortby = property(_get_sortby, _set_sortby)
/usr/lib/python2.7/site-packages/prettytable.pyc in _validate_option(self,
option, val)
202 self._validate_nonnegative_int(option, val)
203 elif option in ("sortby"):
--> 204 self._validate_field_name(option, val)
205 elif option in ("sort_key"):
206 self._validate_function(option, val)
/usr/lib/python2.7/site-packages/prettytable.pyc in _validate_field_name(self,
name, val)
278 assert val in self._field_names
279 except AssertionError:
--> 280 raise Exception("Invalid field name: %s!" % val)
281
282 def _validate_all_field_names(self, name, val):
Exception: Invalid field name: None!
Original issue reported on code.google.com by tucky.k...@gmail.com on 29 Oct 2012 at 9:02
The text was updated successfully, but these errors were encountered:
Thanks for reporting this! While the documentation is currently wrong, it
describes the way that *things* should work, so I will change the code in the
next release.
Original comment by luke@maurits.id.au on 31 Oct 2012 at 6:00
Original issue reported on code.google.com by
tucky.k...@gmail.com
on 29 Oct 2012 at 9:02The text was updated successfully, but these errors were encountered: