Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15461
| References | (1 earlier) <415d875d-bc6d-4e69-bcf8-39754b45030a@n18g2000vbv.googlegroups.com> <j98tnf$qh0$1@reader1.panix.com> <j995df$490$1@reader1.panix.com> <eb3e170a-ffd2-4579-96a4-6b213c031f50@h24g2000yqm.googlegroups.com> <j9adj5$qki$1@dough.gmane.org> |
|---|---|
| Date | 2011-11-08 18:35 +1100 |
| Subject | Re: Python ORMs Supporting POPOs and Substituting Layers in Django |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2536.1320737736.27778.python-list@python.org> (permalink) |
On Tue, Nov 8, 2011 at 4:09 PM, Lie Ryan <lie.1296@gmail.com> wrote: > IMO, Python has a much nicer choice of built-in data structure for data > processing. Python has a much more mature object-orientation, e.g. I prefer > writing l.append(x) rather than array_push(l, x). I think these qualities > are what makes you think Python is much, much more suitable for data > processing than PHP; and I wholesomely agree. > Two more examples where Python's lists are superior to PHP's arrays. Array literal syntax feels like a function call, but list literals are slim and easy to use inside expressions (try creating a nested array as a function argument - you'll get a forest of parens). Also, dereferencing an array only works on an array variable - if you have a function that returns an array, you can't dereference it directly: $foo = func()[1]; # doesn't work $foo = func(); $foo=$foo[1]; # works I much prefer the "everything's an object" notion. C's array literals are just as weird (although in C, you can directly dereference a literal character array - "ABCDEFG"[note_idx] will give you a note name as a char)... much easier when a variable name is just an expression, a function call is an expression, a literal is an expression, and you can work with them all the same way. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python ORMs Supporting POPOs and Substituting Layers in Django Travis Parks <jehugaleahsa@gmail.com> - 2011-11-05 13:11 -0700
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Marco Nawijn <nawijn@gmail.com> - 2011-11-05 13:35 -0700
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Chris Angelico <rosuav@gmail.com> - 2011-11-06 09:09 +1100
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Travis Parks <jehugaleahsa@gmail.com> - 2011-11-05 20:22 -0700
Re: Python ORMs Supporting POPOs and Substituting Layers in Django John Gordon <gordon@panix.com> - 2011-11-07 15:33 +0000
Re: Python ORMs Supporting POPOs and Substituting Layers in Django John Gordon <gordon@panix.com> - 2011-11-07 17:44 +0000
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Travis Parks <jehugaleahsa@gmail.com> - 2011-11-07 18:21 -0800
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Lie Ryan <lie.1296@gmail.com> - 2011-11-08 16:09 +1100
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Travis Parks <jehugaleahsa@gmail.com> - 2011-11-12 08:11 -0800
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Chris Angelico <rosuav@gmail.com> - 2011-11-08 18:35 +1100
Re: Python ORMs Supporting POPOs and Substituting Layers in Django Dave Angel <d@davea.name> - 2011-11-08 07:58 -0500
csiph-web