In article ,
rustompm...@gmail.com says...
>
> Yeah python has trees alright.
>
> Heres' some simple tree-code
Didn't you just demonstrate that Python has no trees and instead you
have to implement them yourself (or use a third-party implementation)?
I don't know what's the point of all this
think
the script is buggy or I am not able to use it, even if seems very simple to
use...
Anyone can give me an hint on how to easily and simply print some text? Is
there a library ready to download and use? Something like SendPrinter("some
text\n")?
Thanks in advance if anyone can give a
Thanks SO MUCH! :) I tested all the
different things and worked perfectly with no problem.
Thanks again, I was trying to do the printing since a lot but never seen
that windows api thing before.
Mario
--
http://mail.python.org/mailman/listinfo/python-list
"Larry Bates" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Mario,
>
> Here is a function stripped from a working program that uses printpreview
> from wxWindows to print out cells from a grid that the user is working
> on. Hopefully t
s wrote there, but it gives
errors, I think the script is not updated and not working fine with the
latest versions of python or wxpython.
Mario
--
http://mail.python.org/mailman/listinfo/python-list
I have checks in code, to ensure a decode/encode cycle returns the
original string.
Given no UnicodeErrors, are there any cases for the following not to
be True?
unicode(s, enc).encode(enc) == s
mario
--
http://mail.python.org/mailman/listinfo/python-list
ve u"Hallo" -- does this mean
that the ignored/lost bytes in the original strings are not illegal
but *represent nothing* in this encoding?
I.e. in practice (in a context limited to the encoding in question)
should this be considered as a data loss, or should these strings be
considered "equivalent"?
Thanks!
mario
--
http://mail.python.org/mailman/listinfo/python-list
t;> unicode(s, 'mcbs').encode('mcbs')
Traceback (most recent call last):
File "", line 1, in
LookupError: unknown encoding: mcbs
Best wishes to everyone for 2008!
mario
--
http://mail.python.org/mailman/listinfo/python-list
"copyright", "credits" or "license" for more information.
>>> unicode('', 'mbcs')
u''
>>> unicode('', 'mbcs').encode('mbcs')
Traceback (most recent call last):
File "", line 1, in
LookupError: unknown encoding: mbcs
>>>
mario
--
http://mail.python.org/mailman/listinfo/python-list
ng: mbcs
>>>
Hmmn, strange. Same behaviour for "raboof".
> (2) Read what the manual (Library Reference -> codecs module ->
> standard encodings) has to say about mbcs.
Page at http://docs.python.org/lib/standard-encodings.html says that
mbcs "purpos
On Jan 2, 12:28 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Jan 2, 9:57 pm, mario <[EMAIL PROTECTED]> wrote:
>
> > Do not know what the implications of encoding according to "ANSI
> > codepage (CP_ACP)" are.
>
> Neither do I. YAGNI (especiall
n one convenient place. I
provide a write-up and the code for it here:
http://gizmojo.org/code/decodeh/
I will be very interested in any remarks any of you may have!
Best regards, mario
--
http://mail.python.org/mailman/listinfo/python-list
anyway actally in ascii
or utf-8? e.g. this mail message! I'll let this issue turn for a
little while...
> > I will be very interested in any remarks any of you may have!
>
> From a shallow inspection, it looks right. I would have spelled
> "losses" as "loses".
Yes, corrected.
Thanks, mario
--
http://mail.python.org/mailman/listinfo/python-list
may be lossy when that is re-encoded, and compared to original.
However it is clear that the test above should always pass in this
case, so doing it seems superfluos.
Thanks for the unicodedata.normalize() tip.
mario
--
http://mail.python.org/mailman/listinfo/python-list
quot;)
unicode("", "non-existent")
mario
[*] a module to decode heuristically, that imho is actually starting
to look quite good, it is at http://gizmojo.org/code/decodeh/ and any
comments very welcome.
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 4, 12:02 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Jan 4, 8:03 am, mario <[EMAIL PROTECTED]> wrote:
> > On Jan 2, 2:25 pm, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>
> > > Apparently for the empty string the encoding is irrelevant as it will
On Feb 3, 12:35 pm, TeroV <[EMAIL PROTECTED]> wrote:
> Jorge Godoy wrote:
> > mario ruggier wrote:
>
> >> Is there any way to tell between whether a keyword arg has been explicitly
> >> specified (to the same value as the default for it) or not... F
On Feb 3, 4:19 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Diez B. Roggisch wrote:
> > Bjoern Schliessmann schrieb:
> >> mario ruggier wrote:
>
> >>> It may sometimes be useful to make use of the conceptual
> >>> difference between these two cas
fwiw, some sample timeit code:
import timeit
print timeit.Timer("for x in exprs: gie[x]",
"from __main__ import gie, exprs").timeit(50)
I had done various poking to discover if it could be made to go
faster, and in the end I settled on the version above.
mario
I
ot name in self.codes:
self.codes[expr] = compile(name, '', 'eval')
return self[expr]
# handle any other error...
This retains the correctness of the check, and has the same marginal
perf improvement (that is basically negligible, b
correction: the code posted in previous message should have been:
def __getitem__(self, expr):
try:
return eval(self.codes[expr], self.globals, self.locals)
except:
# We want to catch **all** evaluation errors!
# KeyError, NameError, Attribu
What easyToLearn tools you suggest for creating:
1. powerfull web applications
2. desktop applications
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 28 Apr 2009 17:37:57 -0700, Daniel Fetchinson wrote:
>> What easyToLearn tools you suggest for creating: 1. powerfull web
>> applications
>
> Have a look at http://wiki.python.org/moin/WebFrameworks
>
> You will find that there are many options each with its own fan crowd
> emphasizing t
On Wed, 29 Apr 2009 13:38:53 +, Mario wrote:
> On Tue, 28 Apr 2009 17:37:57 -0700, Daniel Fetchinson wrote:
>
>>> What easyToLearn tools you suggest for creating: 1. powerfull web
>>> applications
>>
>> Have a look at http://wiki.python.org/moin/WebFramew
I used JCreator LE, java IDE for windows because, when I add documentation
of some new library, I have it on a F1 and index. So how you manage
documentation and code completion ? I asume that you are geek but not even
geeks could know every method of every class.
"Daniel Fetchinson" wrote in m
npack_symbol('foo, bar, baz')
('foo', 'bar', 'baz')
>>> unpack_symbol('foo, "bar, baz", blurf')
('foo', 'bar, baz', 'blurf')
>>> unpack_symbol('foo, bar(baz, blurf), mumble')
('foo', "bar('baz', 'blurf')", 'mumble')
>>>
Mario Ruggier
--
http://mail.python.org/mailman/listinfo/python-list
(that, actually, are also pretty good ;-)
So yes, agree with you entirely, that shameless personal preference is
important for choosing your templating system... ;)
mario
--
http://mail.python.org/mailman/listinfo/python-list
quickly, and remember it...
Btw, you may be interested in a small example of wsgi based app that
uses evoque -- one of the examples of how to use evoque under various
contexts:
http://evoque.gizmojo.org/ext/
mario
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 28, 11:51 pm, Fett <[EMAIL PROTECTED]> wrote:
> I am creating a program that requires some data that must be kept up
> to date. What I plan is to put this data up on a web-site then have
> the program periodically pull the data off the web-site.
>
> My problem is that when I pull the data (c
I delete by error the python window inteface and now i cant reupload again
some advice is apreciated
thanks
--
http://mail.python.org/mailman/listinfo/python-list
I have from time ago installed Python 2.6, 2.7, 3.2 and the last 3.3 beta
but now I can upload the window version not the prompt command
some advice is needed
i desintalled and reinstall and nothing!!
thanks in advance
Mario
--
http://mail.python.org/mailman/listinfo/python-list
) to get the directory of the
> currently running script? Something along the line of:
>
> open (API.getCurrentPath + 'config.txt', 'r').
>
> thanks a lot,
>
> cheers
>
> Alex
os.path.join(sys.path[0], 'config.txt')
If the script and config.txt are i
Hello!
Im newbie in Linux, I have instaled Ubuntu 5.04, but I couldt install
the wxPython 2.6.1, anybody help me??
For this reason I dont do my Job , because I use SpeIde and Boa
Constructor, and both dont run with the old v wxPython 2.5.3
Thanks in advance!!
--
Saludos / Best regards
Mario
about
this tools and his conection/working with Python.
Thanks!!!
--
Saludos / Best regards
Mario Lacunza
Email: [EMAIL PROTECTED]
Lima - Peru
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
zacharygilmar...@gmail.com says...
>
> Why aren't there trees in the python standard library?
I don't know much about python development process and strategies, but I
suspect it shouldn't be much different from any other language I know
of. So here's my tentative answer:
Once gen
Hello Terry,
It is not play with words. A tree is a recursive - nested -
hierachical
data structure with the restriction of no cycles or alternate
pathways.
Python collections whose members are general objects, including
collections, can be nested. The resulting structures *are* tree
structures
Chris,
Scenario: You're introducing someone to Python for the first time.
S/he may have some previous programming experience, or may be new to
the whole idea of giving a computer instructions. You have a couple of
minutes to show off how awesome Python is. What do you do?
Some ideas where give
In article , alan@scooby-
doo.csail.mit.edu says...
> Even in a 64-bit Java, the _type_ returned by String.length() is
> 'int', and is thus at most (2**31 - 1). This isn't a problem for
> strings, which never get that long in practice, but for some other
> Java datatypes (e.g., Buffer) it is a rea
In article ,
ros...@gmail.com says...
>
> Bad idea. Better to pick a language that makes it easy to get things
> right, and then work on the fun side with third-party libraries, than
> to tempt people in with "hey look how easy it is to do X" and then
> have them stuck with an inferior or flawed
In article <873873ae91@jester.gateway.sonic.net>,
no.email@nospam.invalid says...
>
> Steven D'Aprano writes:
> > In 2009, Robert Martin gave a talk at RailsConf titled "What Killed
> > Smalltalk Could Kill Ruby"... http://www.youtube.com/watch?v=YX3iRjKj7C0
>
> That's an hour-long video;
In article <54c0a571$0$13002$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> The point isn't that there are no other alternative interpretations
> possible, or that annotations are the only syntax imaginable, but that
> they're not hard to guess what they m
Rick,
Python is the only thing that is pure in the programming world. The
only language that offers the cleanest and most intuit-able syntax,
AND YOU"RE JUST GOING TO THROW IT ALL AWAY SO YOU CAN BE A LAPDOG OF
SATAN?
Nonsense. You are just used to it. I can read C with the same feeling of
in
Chris,
Hold on a moment, how often do you really do this kind of thing with
"might be one of them or a sequence"?
Is it really that important that I give a more real-life example, or can't
you just get the problem from a ad-hoc example?
I could replace the variable names with spam, ham and
Chris,
I'd rather see a real-world example that can't be solved with either
better design or some simple aliases. (And yes, the type hinting does
allow for aliases.)
Python is a duck-typing language, Chris. It is in its nature -- and we have
been taught -- to ignore types and care only about
Chris,
On Thu, Jan 22, 2015 at 9:46 PM, Nicholas Cole
wrote:
Hang on! The particular example may not make a lot of sense but there
are plenty of places in ordinary Python where functions can accept
different objects in arguments and return different things. The point
here is that that will be
In article ,
random...@fastmail.us says...
> How is that the opposite direction? It's a short jump from there to
> "pylint [or whatever tool] will consider a lack of type hinting to be
> something to warn for" and "managers/customers will consider this
> warning to mean your program has failed and
In article ,
sturla.mol...@gmail.com says...
>
> On 22/01/15 20:10, Mario Figueiredo wrote:
>
> > Customers don't have access to static analysis output and project
> > managers should know better than to demand static analysis without
> > properly contextualiz
In article ,
rantingrickjohn...@gmail.com says...
> python was meant to be a gateway to intuitive programming bliss.
> Python was meant to be the "lingua franca" of the Programming world.
And it failed miserably on both instances. Like any other programming
language before and after it which p
In article <6eb91c4b-92ff-44a8-b5a9-6ef04c71f...@googlegroups.com>,
rantingrickjohn...@gmail.com says...
>
> So if the purpose is "static analysis", what is the
> justification for injecting new syntax into function sigs?
1. Annotations where created exactly for this purpose. So there's some
pr
In article ,
ian.g.ke...@gmail.com says...
>
> On Thu, Jan 22, 2015 at 3:27 PM, Chris Kaynor
> wrote:
> > Or use Any, which is basically the same thing:
> >
> > def adder(a: Any, b: Any) -> Any:
> > return a + b
>
> Yeah, but this just seems like extra noise since it's not going to
> help
In article <5afad59b-5e8c-4821-85cf-9e971c8c7...@googlegroups.com>,
rantingrickjohn...@gmail.com says...
>
> On Thursday, January 22, 2015 at 10:04:29 PM UTC-6, Chris Angelico wrote:
>
> > It's worth pointing out, too, that the idea isn't
> > panaceaic - it's just another tool in the box. Any ti
In article <12d74fb6-f7d7-4ff0-88d3-6076a5dc7...@googlegroups.com>,
rantingrickjohn...@gmail.com says...
>
> Injecting polarity into debates is dangerous, because, then
> we get off into the emotional weeds and a solution may never
> be found -- just observe the polarization of American
> politic
In article <4b3b498a-c9b0-443d-8514-87ccd8e98...@googlegroups.com>,
rantingrickjohn...@gmail.com says...
>
> (Example modified for PEP8 compliance ;-)
>
> @typehint(arg1:str, arg2:int, returns:bool)
> def myfunction(arg1, arg2):
> return True
>
> Of course "@typehi
In article , mar...@gmail.com
says...
>
>
> So I'd rather see:
>
> def myfunction(arg1, arg2):
> """
> Normal docstring.
> """
> "@typehint: (str, int) -> bool"
> return True
>
Actually that is idiotic. Much better is:
def myfunction(arg1, arg2):
In article ,
sohcahto...@gmail.com says...
>
> > def myfunction(arg1, arg2):
> > """
> > Normal docstring...
> > @typehint: (str, int) -> bool
> > """
> > return True
> >
>
> I really like that implementation.
>
> Its unobtrusive and doesn't clutter th
Steven D'Aprano,
Rick, you seem to be under the misapprehension that a reductio ad
absurdum argument is a fallacy. It is not. From Webster's dictionary:
Indirect demonstration, or Negative demonstration (called
also reductio ad absurdum), in which the correct
conclusion is an inference from the
Consider the following code at your REPL of choice
class Super:
pass
class Sub:
pass
foo = Sub()
Sub.__bases__
foo.__bases__
The last statement originates the following error:
AttributeError: 'Sub' object has no attribute '__ba
In article <54c39e48$0$12996$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> I'm not sure if you're making a general observation or one which is
> specific
> to Python. Plenty of languages have static analysis as a language feature.
> Are you arguing they are
In article , mar...@gmail.com
says...
>
> In article <54c39e48$0$12996$c3e8da3$54964...@news.astraweb.com>,
> steve+comp.lang.pyt...@pearwood.info says...
> >
> > def myfunction(arg1, arg2):
> > """
> > Normal docstring.
> > @typehint: (str, int) -> bool"""
> > return True
> >
In article ,
tjre...@udel.edu says...
> > AttributeError: 'Sub' object has no attribute '__bases__'
>
> In this message, 'Sub' is an adjective, modifying 'object, not naming
> it. If you attend to the last line of the traceback
>
My first reaction is to look at 'Sub' as a noun, not an
In article <54c39366$0$13006$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
> > AttributeError: 'Sub' instance has no attribute '__bases__',
> > AttributeError: 'foo' object has no attribute '__bases__'
>
> The first would be nice. The second is
In article ,
tjre...@udel.edu says...
>
> > "__main__"
> > from module import a_name
>
> A module is a namespace associating names with objects. This statememt
> says to import the a_name to object association from module and add it
> to __main__
>
> > y = a_name + 1
>
> This
In article ,
ian.g.ke...@gmail.com says...
>
> On Sat, Jan 24, 2015 at 2:14 PM, Mario Figueiredo wrote:
> > But that begs the OT question:
>
> No, it doesnt. http://en.wikipedia.org/wiki/Begging_the_question
Cute.
> I'm not sure I'm understanding wha
In article ,
ros...@gmail.com says...
>
> Let me explain by way of analogy.
[snipped]
Gotcha! Thanks for the explanation :)
--
https://mail.python.org/mailman/listinfo/python-list
In article <54c2299d$0$13005$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> I don't think that a raise of 0.10001 (10%),
> 0.035003 (3.5%) or 0.070007 (7%) is quite what
> people intended.
>
> (Don't use binary floating p
In article ,
ian.g.ke...@gmail.com says...
>
> No, you're being told that the *object* doesn't know the names of the
> variables that it's bound to. In the context above, the variable is
> right there under that name in the globals dict, as can be seen in the
> disassembly:
[snipped]
Yes. I got
In article ,
ros...@gmail.com says...
> Awesome! I'm always a bit wary of analogies... sometimes they're
> really helpful, other times they're unhelpful and confusing.
Yeah. Your's was all it took :)
The thing with analogies is to never take them literally. They are
analogies, after all. But th
In article ,
ros...@gmail.com says...
>
> On Sun, Jan 25, 2015 at 10:20 AM, Rick Johnson
> wrote:
> > Besides, why does he need *ME* to lick his boots when he
> > already has plenty of fan-boys over at python-ideas and
> > python-dev lining up. This community is *NOT*, and should
> > never be, a
In article <54c4606a$0$13002$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> It doesn't.
Your explanation was great Steven. Thank you. But raises one question...
>
> Assigning a value to a variable ("m = 42", hex 2A) results in the compiler
> storing that
In article <54c4dae1$0$13005$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
> [...]
Most excellent. Thanks for the hard work, explaining this to me. :)
Knowing Python internals is something that will end benefiting me in the
long run. There's much to be gained
Consider the following class:
class A:
def __init__(self, value):
self.value = value
def __del__(self):
print("'A' instance being collected...")
def __repr__(self):
return str(self.value)
If ran as a script, the destructor behavior
In article , mar...@gmail.com
says...
> [...]
Forgot to mention this is Python 3.4.2
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
pyt...@mrabarnett.plus.com says...
> In the REPL, the result of an expression is bound to '_':
>
> >>> x1 = A(12)
> >>> x1 # _ will be bound to the result.
> 12
> >>> x1 = 'string'
> >>> # At this point, _ is still bound to the object.
> >>> 0 # This will bind _ to another objec
In article ,
random...@fastmail.us says...
>
> On Mon, Jan 26, 2015, at 19:11, Steven D'Aprano wrote:
> > random...@fastmail.us wrote:
> > - lexical analysis has to look for twice as many files (it has to
> > hit the hard drive for a stub file before looking at the source),
> > and we know f
In article ,
jpiit...@ling.helsinki.fi says...
>
> If you mean literally some_predicate, then perhaps this.
>
> if some_predicate:
>for x in seq:
> handle(x)
>
Careful. See Chris Warrick answer for the correct position of the 'if'
statement.
--
https://mail.python.org/mailman/listi
This is a follow up from a previous discussion in which it is argued
that the following code produces the correct error message terminology,
considering that in Python an object is also an instance.
>>> class Sub:
>>> pass
>>> foo = Sub()
>>> foo.__bases__
[...]
In article ,
ros...@gmail.com says...
>
> On Wed, Jan 28, 2015 at 4:59 AM, Mario Figueiredo wrote:
> > An optional feature says nothing of its requirements. The requirements
> > for PEP 484 are heavy. Not only will they force an update to the
> > interpreter, but will
In article <80a9f882-6b13-45a7-b514-8c47b3a4c...@googlegroups.com>,
andre.robe...@gmail.com says...
>
> You keep writing "an object is not an instance", making statements
> such as "the terminology keeps indicating that in Python an object is
> an instance" and yet, none of the examples you show
In article ,
ros...@gmail.com says...
>
> On Wed, Jan 28, 2015 at 7:58 AM, Mario Figueiredo wrote:
> > Looking at PEP 3107, i'm left wondering: what if I have for instance
> > already annotated my functions for parameter marshalling, following the
> > syntax expe
In article ,
ros...@gmail.com says...
>
> Sure you can! But this is *itself* a weak argument, unless you
> actually have a codebase that uses it.
Wait. Are you saying that unless I show you a codebase that requires
marshalling and static analysis, you will ignore the fact that a
project, no ma
I can now start to understand the criticism of how Python is evolving
coming from many corners, either long term python educators like Mark
Lutz.
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
andre.robe...@gmail.com says...
>
> It is appropriate to refer to an instance as an object. It might not
> be appropriate to refer to an object as an instance ... but Python
> does not do so as your explicit examples demonstrate, and contrary to
> your claim.
I'll try one more ti
In article <9a2cf6ca-2eb8-4a87-9e83-e87d90d5f...@googlegroups.com>,
andre.robe...@gmail.com says...
>
> **This is a follow up from a previous discussion in which it is argued
> that the following code produces the correct error message terminology **
>
> I pointed out to you that the word objec
In article ,
n...@nedbatchelder.com says...
>
> A common mistake is to believe that "OOP" is a well-defined term. It's
> not it's a collection of ideas that are expressed slightly differently
> in each language.
A common mistake is thinking just because OOP has different
implementations, it
In article ,
ben+pyt...@benfinney.id.au says...
> > > This is why I say that even in Python, where a class is an object,
> > > an object is not always an instance. The language itself forces that
> > > distinction.
>
> You have not, to my knowledge, shown any object (in Python 2.2 or later)
> whi
In article ,
ros...@gmail.com says...
>
> On Wed, Jan 28, 2015 at 10:22 AM, Ned Batchelder
> wrote:
> > I don't know what the difference is between "object" and "instance". An
> > object is an instance of a class. The two words are interchangeable as far
> > as I know.
>
> My understanding i
In article ,
ros...@gmail.com says...
>
> On Wed, Jan 28, 2015 at 11:17 AM, Mario Figueiredo wrote:
> > Means the object is capable of participating in inheritance and/or
> > polymorphism. An instance of an object is capable of doing so, per its
> > class definitions
In article ,
breamore...@yahoo.co.uk says...
>
> Mario and Andre, when you have to write code to meet the deadline to get
> the stage payment, does either of your bosses really care whether or not
> you are dealing with an object, an instance, or a piece of dead meat
>
In article ,
ben+pyt...@benfinney.id.au says...
>
> Mario Figueiredo writes:
>
> > It is true that a class object is an instance of 'type'. But this is a
> > special type (can't avoid the pun).
>
> Nevertheless it is a class, and can do everything t
In article <54c8339f$0$13008$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
> (3) _ is also commonly used as a "don't care" variable name:
>
> a, _, b, _ = get_four_items() # but I only care about two of them
>
According to the following link, it is actually
In article ,
ben+pyt...@benfinney.id.au says...
>
> More accurately (and as acknowledged in that guide), a single underscore
> *is* a common name for a ?don't care? name, but is better avoided for
> that purpose because it's also commonly used for other purposes.
>
> In other words: That guide i
In article ,
breamore...@yahoo.co.uk says...
>
> The thing that bothers me is that many people, some of them with maybe
> 20 years of Python experience, have repeatedly stated Python concepts
> with respect to the terms class, instance and object. Instead of
> accepting their knowledge of the
In article <54c83ab4$0$12982$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> Mario Figueiredo wrote:
>
> > Static analysis cannot and should not clutter executable code.
>
> (1) It isn't clutter. The human reader uses
In article ,
breamore...@yahoo.co.uk says...
>
> C and C++ are weakly and statically typed languages. Python is a
> strongly and dynamically typed language. Therefore anything following
> based on the above paragraph alone is wrong.
>
Indeed. I confused strongly/weakly with static. I feel a
In article <54c980cd$0$12981$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> Ian, that's obvious. Just open your eyes:
>
> Scala
> def addInt( a:Int, b:Int ) : Int
>
> Python
> def addInt( a:int, b:int ) -> int:
>
>
> They're COMPLETELY different. In Scal
In article <54ca5bbf$0$12992$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
> Why should I feel guilty? You wrote:
>
>
> "Static analysis cannot and should not clutter executable code."
>
>
> But what are type declarations in statically typed languages lik
In article <54ca5bbf$0$12992$c3e8da3$54964...@news.astraweb.com>,
steve+comp.lang.pyt...@pearwood.info says...
>
>
> Why should I feel guilty? You wrote:
>
>
> "Static analysis cannot and should not clutter executable code."
>
>
> But what are type declarations in statically typed languages
In article ,
breamore...@yahoo.co.uk says...
>
> No, they're not always weakly typed. The aim of the spreadsheet put up
> by Skip was to sort out (roughly) which languages belong in which camp.
> I do not regard myself as suitably qualified to fill the thing out.
> Perhaps by now others hav
Currently i'm using the following code to transform a row fetched from an
sqlite database into a dictionary property:
def __init__(self, id_):
self.id = id_
self.data = None
...
conn = sqlite3.connect('data')
conn.row_factory = sqlite3.Row
row = conn.
In article ,
__pete...@web.de says...
>
> self.data = dict(row)
I didn't realize from the documentation it could be this simple. Thanks.
>
> And now an unsolicited remark: if you have more than one instance of Unknown
> you might read the data outside the initialiser or at least keep the
> c
1 - 100 of 319 matches
Mail list logo