Re: What's the best way to minimize the need of run time checks?

2016-08-28 Thread Juan Pablo Romero Méndez
2016-08-28 0:04 GMT-07:00 Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info>: > On Sunday 28 August 2016 15:56, Juan Pablo Romero Méndez wrote: > > > 2016-08-27 21:30 GMT-07:00 Steve D'Aprano : > [...] > >> Now it is true that speaking in full

Re: What's the best way to minimize the need of run time checks?

2016-08-27 Thread Juan Pablo Romero Méndez
2016-08-27 21:30 GMT-07:00 Steve D'Aprano : > On Sun, 28 Aug 2016 12:31 pm, Juan Pablo Romero Méndez wrote: > > > 2016-08-14 7:29 GMT-07:00 Steven D'Aprano : > > > >> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > >> > >>

Re: What's the best way to minimize the need of run time checks?

2016-08-27 Thread Juan Pablo Romero Méndez
2016-08-27 21:30 GMT-07:00 Steve D'Aprano : > On Sun, 28 Aug 2016 12:31 pm, Juan Pablo Romero Méndez wrote: > > > 2016-08-14 7:29 GMT-07:00 Steven D'Aprano : > > > >> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > >> > >>

Re: What's the best way to minimize the need of run time checks?

2016-08-27 Thread Juan Pablo Romero Méndez
2016-08-14 7:29 GMT-07:00 Steven D'Aprano : > On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote: > > > I've been trying to find (without success so far) an example of a > > situation where the dynamic features of a language like Python provides a > > c

Re: What's the best way to minimize the need of run time checks?

2016-08-12 Thread Juan Pablo Romero Méndez
2016-08-12 1:10 GMT-07:00 Lawrence D’Oliveiro : > On Thursday, August 11, 2016 at 8:33:41 AM UTC+12, Juan Pablo Romero > Méndez wrote: > > > I've been trying to find (without success so far) an example of a > situation > > where the dynamic features of a language

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
atures of some language are a better solution than static typing. This is of course more useful in languages that support both paradigms. Juan Pablo 2016-08-10 13:50 GMT-07:00 Michael Selik : > > > On Wed, Aug 10, 2016, 4:34 PM Juan Pablo Romero Méndez < > jpablo.rom...@gmail.com>

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 18:28 GMT-07:00 Steven D'Aprano : > On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > > > Hello, > > > > In online forums sometimes people complain that they end up having to > test > > constantly for None, > > Then don'

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 23:16 GMT-07:00 Gregory Ewing : > Juan Pablo Romero Méndez wrote: > > This is interesting. You are Ok having runtime errors? >> > > You're going to have runtime errors in any case, whether > they come from code you've put there yourself to check >

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 23:47 GMT-07:00 Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info>: > On Wednesday 10 August 2016 15:20, Juan Pablo Romero Méndez wrote: > > > Ok, so you suggested 1) catching exceptions at the point where you care, > 2) > > preemptively check f

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 18:28 GMT-07:00 Steven D'Aprano : > On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > > > Hello, > > > > In online forums sometimes people complain that they end up having to > test > > constantly for None, > > Then don'

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 14:01 GMT-07:00 Michael Selik : > On Tue, Aug 9, 2016 at 3:22 PM Juan Pablo Romero Méndez < > jpablo.rom...@gmail.com> wrote: > >> I'm actually looking for ways to minimize run time errors, so that would >> include TypeError and AttributeError. >>

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 13:18 GMT-07:00 Rob Gaddi : > Juan Pablo Romero Méndez wrote: > > > 2016-08-09 12:06 GMT-07:00 Paul Rubin : > > > >> Juan Pablo Romero Méndez writes: > >> > In online forums sometimes people complain that they end up having to > >> >

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
What static checking can actually guarantee varies depending on the specific type system at hand (C# vs Haskell vs Idris for example). But most of them can guarantee simple stuff like: "I'm I allowed to invoke this function at this point?" If you don't have that, well you can rely on tests to show

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 12:06 GMT-07:00 Paul Rubin : > Juan Pablo Romero Méndez writes: > > In online forums sometimes people complain that they end up having to > > test constantly for None > > That's something of a style issue. You can code in a way that avoids a > lot of

What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
s you like that addresses the following issue: What is the best way to use the dynamic features of Python to avoid having to write a poor's man type system? Thanks! Juan Pablo -- https://mail.python.org/mailman/listinfo/python-list

Re: Glade Survey

2013-11-19 Thread Juan Pablo Ugarte
On Mon, 2013-11-18 at 21:12 -0500, Gene Heskett wrote: [...] > > Invalid in what way? It looks fine to me. Or is it that you don't > > trust its signer? > > > > ChrisA > > Firefox barked at me. So I backed away. And now it works. Phase of moon > sensitive? Chew in wrong side of mouth? Or y

Re: Glade Survey

2013-11-18 Thread Juan Pablo Ugarte
On Mon, 2013-11-18 at 16:04 -0500, Gene Heskett wrote: > On Monday 18 November 2013 16:04:14 Juan Pablo Ugarte did opine: > > > Hello everybody! > > > > We (Glade Developers) are conducting a user survey which will help us > > take informed decisions to improve th

Glade Survey

2013-11-18 Thread Juan Pablo Ugarte
Hello everybody! We (Glade Developers) are conducting a user survey which will help us take informed decisions to improve the overall developer experience. So please take a few minutes to complete the survey, we appreciate it! https://glade.gnome.org/registration.html Cheers Juan

What do you guys think about adding a method "to_json"

2011-09-11 Thread Juan Pablo Romero Méndez
Hello, What do you guys think about adding a method "to_json" to dictionaries and sequence types? Perhaps through a module import? Regards, Juan Pablo -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt GUI

2009-07-08 Thread Juan Pablo Romero Méndez
I use OpenInventor (Coin3d) which have a python binding called "pivy". It works great. http://pivy.coin3d.org/ Juan Pablo 2009/7/8 Helvin : > Hi experts! > > I'm developing a GUI for a software using PyQT, and need 3D > visualization. Should I use PyOpenGL or VTK? &

Re: Developing GUI applications

2009-06-20 Thread Juan Pablo Romero Méndez
PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/intro All the benefits of Qt: multiplataform, excellent documentation, great API, visual widget designer, etc, etc. For the coding itself, I use netbeans + python plugin. Regards, Juan Pablo 2009/6/21 Chris Rebert : > On Sat, Jun

Re: eval() and global variables

2008-12-18 Thread Juan Pablo Romero Méndez
t;", line 1, in File "", line 4, in TypeError: arg 5 (closure) must be tuple >>> Strange... 2008/12/17 Peter Otten <__pete...@web.de>: > Juan Pablo Romero Méndez wrote: > >> Suppose this function is given: >> >> def f(x,y): >

Re: eval() and global variables

2008-12-16 Thread Juan Pablo Romero Méndez
* x**2 - v * y**2 ) ) ... and have the code automatically figure out that w and v are free variables and generate the right code. Right now I can catch w and v (using NameError), but can't figure out how to get python to assign values to w and v (other than declaring them globals). My code nee

eval() and global variables

2008-12-16 Thread Juan Pablo Romero Méndez
f g(k): return f g(1)(1,1) ==> 3 Regards, Juan Pablo -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling and installing python 2.5.2 with Visual C++ 2008

2008-12-10 Thread Juan Pablo Romero Méndez
Finally installed Python 2.6, which is compiled with visual C++ 2008, and all my problems went away. Thanks to all, Juan Pablo 2008/12/10 "Martin v. Löwis" <[EMAIL PROTECTED]>: >> - >> ... >> error: P

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Juan Pablo Romero Méndez
In R: norm = function(v) v/sqrt(sum(v^2)) :) Juan Pablo 2008/12/10 Arnaud Delobelle <[EMAIL PROTECTED]>: > "Dotan Cohen" <[EMAIL PROTECTED]> writes: > >> 2008/12/10 <[EMAIL PROTECTED]>: >>> On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTE

Re: Compiling and installing python 2.5.2 with Visual C++ 2008

2008-12-09 Thread Juan Pablo Romero Méndez
I've been compiling everything needed by pivy (Coin, Qt, SoQt, PyQt) with visual c++ 8, I decided to recompile python itself. Juan Pablo 2008/12/9 Gabriel Genellina <[EMAIL PROTECTED]>: > En Tue, 09 Dec 2008 11:32:46 -0200, Juan Pablo Romero Méndez > <[EMAIL PROTECTED]&

Compiling and installing python 2.5.2 with Visual C++ 2008

2008-12-09 Thread Juan Pablo Romero Méndez
Hello all, I need to compile python myself because of a module (pivy). So I downloaded MS Visual C++ 2008 express edition. It apparently compiled fine but I don't know how to install it to recreate the standard distribution. In linux i'd take "make install", but on window

Re: win32com.client question

2008-02-13 Thread juan pablo
On Feb 13, 2008 11:58 AM, James Matthews <[EMAIL PROTECTED]> wrote: > What do you mean possible? > It is possible to use the library win32com.client in linux? I thought that was only for windows ?¿ -- http://mail.python.org/mailman/listinfo/python-list

Re: fun with lambdas

2005-10-21 Thread Juan Pablo Romero
Thanks to all I settled with this: def partial1(f,b): return lambda a:f(a,b) def partial2(f,a): return lambda b:f(a,b) Juan Pablo 2005/10/20, Mike Meyer <[EMAIL PROTECTED]>: > Robert Kern <[EMAIL PROTECTED]> writes: > > Juan Pablo Romero wrote: > >&

fun with lambdas

2005-10-20 Thread Juan Pablo Romero
this is not the case :( What is happening here? Nevertheless, this code does work fs = [ eval("lambda x: f(x,%d)" % o) for o in [0,1,2,3]] Thanks. Juan Pablo -- http://mail.python.org/mailman/listinfo/python-list