Alain Ketterlin wrote:
> Many of these students suggest Python as the
> development language (they learned it and liked it), and the suggestion
> is (almost) always rejected, in favor of Java or C# or C/C++.
And it was almost always the wrong decision...
Sturla
--
https://mail.python.org/mail
On Thu, 05 Jun 2014 23:21:35 +0300, Marko Rauhamaa wrote:
> Terry Reedy :
>
>> On 6/5/2014 5:53 AM, Marko Rauhamaa wrote:
>>> Chris Angelico :
>>>
If the standard streams are so crucial, why are their most obvious
interfaces insignificant to you?
>>>
>>> I want the standard streams to c
On Fri, Jun 6, 2014 at 9:02 AM, Sturla Molden wrote:
> You cannot spoof the type of an object in Python.
Not without fiddling around. Python 3.4 on win32:
>>> class Foo:
def spam(self):
print(self,"spams")
>>> class Bar:
def spam(self):
print(self,"eats spam")
>>> x = F
Steven D'Aprano :
> In any case, I reject your premise. ALL data types are constructed on
> top of bytes,
Only in a very dull sense.
> and so long as you allow applications *any way* to coerce data types
> to different data types, you allow them to see "inside the black box".
I can't see the by
Steven D'Aprano :
>> "Can be replaced" by who? By the Python developers? By me? By random
>> library calls?
>
> By you. sys.stdout and friends are writable. Any code you call may
> have replaced them with another file-like object, and you should
> honour that.
I can of course overwrite even sys a
On Fri, Jun 6, 2014 at 9:30 AM, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>>> "Can be replaced" by who? By the Python developers? By me? By random
>>> library calls?
>>
>> By you. sys.stdout and friends are writable. Any code you call may
>> have replaced them with another file-like object, and
On 06/06/2014 00:03, Sturla Molden wrote:
Alain Ketterlin wrote:
Many of these students suggest Python as the
development language (they learned it and liked it), and the suggestion
is (almost) always rejected, in favor of Java or C# or C/C++.
And it was almost always the wrong decision...
On 05/06/14 22:27, Alain Ketterlin wrote:
> I have seen dozens of projects where Python was dismissed because of the
> lack of static typing, and the lack of static analysis tools.
If you are worried your code will bring down the next Ariane launch, I
can understand this argument. If you are onl
On 06/06/14 01:41, Mark Lawrence wrote:
> s/almost// :)
Sometimes it is the right decision, like when your code is firmware for
some avionics or medial life-support apparatus.
Sturla
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 5, 2014 at 2:34 PM, Albert-Jan Roskam wrote:
>> If you want to be really picky about removing exactly one line
>> terminator, then this captures all the relatively modern variations:
>> re.sub('\r?\n$|\n?\r$', line, '', count=1)
>
> or perhaps: re.sub("[^ \S]+$", "", line)
That will r
In article ,
Ned Deily wrote:
> In article <8681edf0-7a1f-4110-9f87-a8cd0988c...@googlegroups.com>,
> Rustom Mody wrote:
>
> > On Friday, June 6, 2014 2:30:26 AM UTC+5:30, Roy Smith wrote:
> > > Just for fun, I took a screen-shot of what this looks like in my
> > > newsreader. URL below. L
In article ,
Sturla Molden wrote:
> On 05/06/14 22:27, Alain Ketterlin wrote:
> > I have seen dozens of projects where Python was dismissed because of the
> > lack of static typing, and the lack of static analysis tools.
>
> If you are worried your code will bring down the next Ariane launch,
On Fri, 6 Jun 2014 03:37:56 +1000, Chris Angelico wrote:
> On Fri, Jun 6, 2014 at 2:56 AM, Wiktor wrote:
>> I guess, I'll try to do what Chris proposed. Forget about this
>> implementation and write python script from the scratch looking only at the
>> original JavaScript version. :-/
>
> Sadl
On 06/06/14 02:13, Roy Smith wrote:
> Well, you *can* play evil games with the struct module :-)
But then you are asking for it, it does not happen by accident.
Sturla
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
Roy Smith wrote:
> In article ,
> Ned Deily wrote:
> > Roy is using MT-NewsWatcher as a client.
> Yes. Except for the fact that it hasn't kept up with unicode, I find
> the U/I pretty much perfect. I imagine at some point I'll be force to
> look elsewhere, but then again, netne
Sorry for the attachment issue. I'm used to the wxPython-users Google
group, where posters are instructed to attach code to their post instead
of including it in the body of the message.
I placed the latest version of my sample code below, since I made a few
minor changes to it after posting it
Paul Rubin writes:
> Nikolaus Rath writes:
>> Still no context before the ominous close() call. I'm very confused.
>
> close() could be getting called from a destructor as the top level
> function of a thread exits, or something like that.
Shouldn't the destructor have its own stack frame then,
On Fri, Jun 6, 2014 at 8:57 AM, R Johnson
wrote:
> Sorry about that. As you can probably tell, I'm relatively new to using
> mailing lists. I'm not exactly sure why that occurred like it did. I'll try
> adding "Re:" in front of the subject when I send this e-mail, and see if it
> works right this
Nikolaus Rath writes:
> Chris Angelico writes:
>> On Wed, Jun 4, 2014 at 12:30 PM, Nikolaus Rath wrote:
>>> I've instrumented one of my unit tests with a conditional
>>> 'pdb.set_trace' in some circumstances (specifically, when a function is
>>> called by a thread other than MainThread).
>>
>> I
On 6/5/2014 7:30 PM, Marko Rauhamaa wrote:
Steven D'Aprano :
"Can be replaced" by who? By the Python developers? By me? By random
library calls?
By you. sys.stdout and friends are writable. Any code you call may
have replaced them with another file-like object, and you should
honour that.
I
dieter writes:
[...]
> Someone else already mentioned that the "close" call
> can come from a destructor. Destructors can easily be called
> at not obvious places (e.g. "s = C(); ... x = [s for s in ...]";
> in this example the list comprehension calls the "C" destructor
> which is not obvious whe
On Fri, Jun 6, 2014 at 12:16 PM, Nikolaus Rath wrote:
> - Is there some way to make the call stack for destructors less confusing?
First off, either don't have refloops, or explicitly break them.
That'll at least make things a bit more predictable; in CPython,
you'll generally see destructors ca
On Thu, 05 Jun 2014 23:13:00 +0100, Mark Lawrence wrote:
> I'll simply say that I
> understand Python to be strongly, dynamically typed.
Correct.
Anyone who hasn't done so needs to read this:
http://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/
I wouldn't quite go so far as to say
On Friday, June 6, 2014 4:22:22 AM UTC+5:30, Chris Angelico wrote:
> On Fri, Jun 6, 2014 at 8:35 AM, Rustom Mody wrote:
> > And then ask how Linux (in your and Stallman's sense) differs from
> > Windows in how the filesystem handles things like filenames?
> What are you testing of the kernel? Mos
On Fri, 06 Jun 2014 09:21:26 +1000, Chris Angelico wrote:
> On Fri, Jun 6, 2014 at 9:02 AM, Sturla Molden
> wrote:
>> You cannot spoof the type of an object in Python.
>
> Not without fiddling around. Python 3.4 on win32:
[...]
x = Foo()
x.spam()
> <__main__.Foo object at 0x0169AB10> s
On Fri, Jun 6, 2014 at 1:11 PM, Rustom Mody wrote:
> All character strings, including
> | filenames, are treated by the kernel in such a way that THEY
> | APPEAR TO IT ONLY AS STRINGS OF BYTES.
Yep, the real issue here is file systems, not the kernel. But yes,
this is one of the very few places w
On Fri, Jun 6, 2014 at 1:16 PM, Steven D'Aprano
wrote:
> On Fri, 06 Jun 2014 09:21:26 +1000, Chris Angelico wrote:
>
>> On Fri, Jun 6, 2014 at 9:02 AM, Sturla Molden
>> wrote:
>>> You cannot spoof the type of an object in Python.
>>
>> Not without fiddling around. Python 3.4 on win32:
> [...]
>>>
On Friday, June 6, 2014 8:50:57 AM UTC+5:30, Chris Angelico wrote:
> kernel doesn't actually do *anything* with the string, it just passes
> it right along to the file system.
Which is what Marko (and others like Armin) are asking of python
(treated as a processing 'kernel'):
"I know what I am do
On 06/05/2014 04:30 PM, Marko Rauhamaa wrote:
What I'm afraid of is that the Python developers are reserving the right
to remove the buffer and detach attributes from the standard streams in
a future version.
Being afraid is silly. If you have a question, ask it.
--
~Ethan~
--
https://mail.
On Fri, 06 Jun 2014 01:54:32 +0200, Sturla Molden wrote:
> When is static analysis actually needed and for what purpose? The
> problem seems to be that managers, team leaders, CEOs, or (insert your
> favorite tite), are not qualified to answer this question. So to be on
> the safe side they go for
> On Jun 5, 2014, at 1:14, Alain Ketterlin wrote:
>
> Swift's memory management is similar to python's (ref. counting). Which
> makes me think that a subset of python with the same type safety would
> be an instant success.
Except that while you don't need to regularly worry about cycles in py
101 - 131 of 131 matches
Mail list logo