I'm writing a little API that other people will use. There are up to 3 "objects" that get passed around. One of them has some validation methods, the other two simply store data and probably won't have any validation or other methods. I only made them objects so that they are syntactically (is that a word?) similar the other object rather than using dictionaries. I figure it also better allows for changes in the future.<br>
<br>Any thoughts on the pros/cons of using my own objects over a dictionary objects?<br><br># this is what I have now...<br>stuff = Stuff(foo="foo", bar="bar") <br>if stuff.is_valid():<br>  cust = Customer(name="John", email="<a href="mailto:foo@bar.com">foo@bar.com</a>")<br>
  order = Order(order_id=1234, amount=12.99)<br>  SomeObject.some_method(stuff, cust, order)<br><br># this would also work...<br>stuff = Stuff(foo="foo", bar="bar") <br>
if stuff.is_valid():<br clear="all">  cust = { 'name': "John", 'email': "<a href="mailto:foo@bar.com">foo@bar.com</a>" }<br>
  order = { 'order_id': 1234, 'amount': 12.99 }<br>
  SomeObject.some_method(stuff, cust, order)<br><br>-- <br>Micah Carrick<br><br><br>