Re: Why did Quora choose Python for its development?



On Mon, May 23, 2011 at 8:41 PM, Octavian Rasnita <orasnita@xxxxxxxxx> wrote:
From: "Daniel Kluev" <dan.kluev@xxxxxxxxx>
As I said, that ORM is not able to do those SQL constructs without using
literal SQL code, but only Python variables and data structures...
An ORM is usually prefered exactly because it doesn't force the programmer
to concatenate strings for generating the SQL code, but he/she can use just
standard Perl/Python code.
Or this is possible in another way without using SQL code?

Did you actually read the code? SQL there is debug output of
SQLAlchemy for python code `Session.query(Test).from_self().all()`, I
left it there to just show you that it emits subquery to RDBMS.
All code in REPL is prefixed by `>>> `. Other lines are just output.

Can it also set the current locale, for example romanian, and print the name of the current month?
...something like t1.date.set_locale('ro').month_name?

There is separate module for date localization. You can pass datetime
object to it and it will give you needed value.

The ones that bash other languages on the mailing list for their prefered language should provide good comparisons and not just make false statements

That would be valid if I would 'bash other languages', but I just
responded to your claim that Perl has advanced modules which are not
available for Python, esp. in web frameworks, as I find it one of
areas where Python shines most.
Sure Python has drawbacks, esp. its performance and poor threads
support (GIL), but flexibility and modules of all flavors and types
are not among them. Introduction of parameter annotations should make
these modules even greater, once python 3.x is widely adopted.

--
With best regards,
Daniel Kluev
.



Relevant Pages

  • Re: Why did Quora choose Python for its development?
    ... interpreting variables in strings which cannot be done so nice in Python. ... Is it possible to configure it to access this subroutine only if a certain number of parameters are sent in the URL? ... As I said, that ORM is not able to do those SQL constructs without using literal SQL code, but only Python variables and data structures... ... Yes you are perfectly right, but not those programmers that also use Perl started to say that Perl can do this and Python can't, or that in Perl this is shorter and nicer than in Python. ...
    (comp.lang.python)
  • Re: How to Begin Web Development with Python ?
    ... want to start web development using python My goal is to learn the web ... Modulok suggested using ORM software. ... be fine with straight SQL (many consider ORM a hindrance rather than ... then SQLAlchemy is very good and is considered pretty much a de facto ...
    (comp.lang.python)
  • Re: Is Python suitable for a huge, enterprise size app?
    ... Python has good DB support - but only simple connectors. ... ORM in Java are much better than ORM in Python. ... FWIW, the only times I've been involved in database-centric projects with a cost in the "tens of millions", the database team steered clear of any sort of any automatic ORM layer altogether. ... Just because the app itself is very OO, it doesn't always follow that the database level needs to be - there are lots and lots of problems for which normal RDBMS tables & joins are a pretty darn good fit. ...
    (comp.lang.python)
  • Re: Is there something easier than ORM?
    ... Recently I am studying some python ORM libraries, ... These are very powerful technologies to handle database. ... In short, I gather that others on this list are a lot more fond of SqlAlchemy and ORMs in general than I am. Granted, my experience is very limited. ...
    (comp.lang.python)
  • Re: python speed
    ... like esp. ... Python are able to be faster than low level code like Fortran, ...
    (comp.lang.python)