Asynchronous programming
Michael Selik
michael.selik at gmail.com
Thu Aug 11 11:51:13 EDT 2016
More information about the Python-list mailing list
Thu Aug 11 11:51:13 EDT 2016
- Previous message (by thread): Asynchronous programming
- Next message (by thread): Asynchronous programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Aug 11, 2016 at 11:46 AM Michael Selik <michael.selik at gmail.com> wrote: > On Thu, Aug 11, 2016 at 11:01 AM Steven D'Aprano < > steve+python at pearwood.info> wrote: > >> That ... looks wrong. You're taking something which looks like a procedure >> in the first case (trn.execute), so it probably returns None, and yielding >> over it. Even it that's not wrong, and it actually returned something >> which >> you ignored in the first case >> > > It's a standard, perhaps a mistaken standard, but nonetheless database > cursors tend to have that feature: execute returns the mutated self. I > agree that execute looks like it should return None instead. The return > self pattern feels Rubyish to me (or Rubic?). > Contradicting myself: yield from c.execute(query).fetchall() # looks good yield from c.execute(query) # looks bad
- Previous message (by thread): Asynchronous programming
- Next message (by thread): Asynchronous programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list