breamore...@gmail.com wrote:
> I hereby request that the moderators take this idiot offline as he's
Mark, please behave yourself.
--
https://mail.python.org/mailman/listinfo/python-list
"I don't understand what difference you intend between “implementations”
and “packages”."
I meant whether the package is self-contained, that is, all the different
implementations for different OS and versions of Python are already contained
in the package itself. But you've already answered m
Rustom Mody :
> The field of numerical analysis came into existence only because this
> fact multiplied by the fact that computers do their (inaccurate ≠
> inexact) computations billions of times faster than we do makes
> significance a very significant problem!
A couple of related anecdotes invol
On Thu, Jul 21, 2016 at 5:52 PM, Marko Rauhamaa wrote:
> A couple of related anecdotes involving integer errors.
>
> 1. I worked on a (video) product that had to execute a piece of code
>every 7 µs or so. A key requirement was that the beat must not drift
>far apart from the ideal over tim
Chris Angelico :
> On Thu, Jul 21, 2016 at 5:52 PM, Marko Rauhamaa wrote:
>> A couple of related anecdotes involving integer errors.
>>
>> 1. I worked on a (video) product that had to execute a piece of code
>>every 7 µs or so. A key requirement was that the beat must not drift
>>far apar
On Thursday, July 21, 2016 at 12:04:35 PM UTC+5:30, Steven D'Aprano wrote:
> On Thursday 21 July 2016 15:28, Rustom Mody wrote:
> > BTW APL whose main domain of application is scientific chooses to enshrine
> > this —equality is ε-neighborhood checking not exact equality checking — into
> > its bui
I am doing an Internship at a company. I have a multi threaded code/firmware in
c. I have done its unit testing with cantata in c++ and now want to do
Integration testing in python with the device connected to my PC. From where do
I start. How and what to write. The code has various functions wi
I'm learning Python and something is really unclear on the chapter im on.
So Python has its own IDE to write code but now it's talking about "code
editors"
My confusion is so I need a code editor like Sublime text? Is that what Python
IDE is for?
--
https://mail.python.org/mailman/listinfo/p
On Thu, Jul 21, 2016 at 11:56 PM, wrote:
> I'm learning Python and something is really unclear on the chapter im on.
>
> So Python has its own IDE to write code but now it's talking about "code
> editors"
>
> My confusion is so I need a code editor like Sublime text? Is that what
> Python IDE i
Beginning Python: using Python 2.6 and Python 3.1. By James Payne
Part II.
But I think that answered my question. Great because au was worried
--
https://mail.python.org/mailman/listinfo/python-list
On 2016-07-21 15:07, Chris Angelico wrote:
On Thu, Jul 21, 2016 at 11:56 PM, wrote:
I'm learning Python and something is really unclear on the chapter im on.
So Python has its own IDE to write code but now it's talking about "code
editors"
My confusion is so I need a code editor like Sublim
sigmaphine1...@gmail.com writes:
> I'm learning Python and something is really unclear on the chapter im
> on.
>
> So Python has its own IDE to write code but now it's talking about
> "code editors"
>
> My confusion is so I need a code editor like Sublime text? Is that
> what Python IDE is for?
Y
On Fri, Jul 22, 2016 at 12:22 AM, wrote:
> Beginning Python: using Python 2.6 and Python 3.1. By James Payne
>
> Part II.
>
> But I think that answered my question. Great because au was worried
Ugh, that's extremely old now. The current versions of Python are 2.7
(first released in 2010, and get
We're designing a server application that parses a custom DSL (domain
specific language) source file, generates a Python module with the
associated logic, and runs the associated code. Since this is a server
application, we need to reload the module after each regeneration. Is
this process is simpl
On Fri, Jul 22, 2016 at 12:42 AM, Malcolm Greene wrote:
> We're designing a server application that parses a custom DSL (domain
> specific language) source file, generates a Python module with the
> associated logic, and runs the associated code. Since this is a server
> application, we need to re
On 21 July 2016 at 07:28, Rayne wrote:
> Thanks! One more question: Does "pip install" require Internet to work? Or
> are all implementations already contained in the packages and so do not
> require additional downloads?
>
pip install is downloading from https://pypi.python.org so yes you do
ne
Malcolm Greene wrote:
> We're designing a server application that parses a custom DSL (domain
> specific language) source file, generates a Python module with the
> associated logic, and runs the associated code. Since this is a server
> application, we need to reload the module after each regener
Thank you Chris and Peter.
The source file we're generating has one main function (go) with some
supporting functions and classes as well. Will there be any problems
referencing additional functions or classes defined in the source that
gets passed to exec ... as long as references to those functi
On Wed, Jul 20, 2016 at 1:16 PM, Random832 wrote:
> On Wed, Jul 20, 2016, at 13:42, Ian Kelly wrote:
>> I had occasion to write something like this:
>>
>> for i, n in reversed(enumerate(x)): pass
>>
>> How would you write this?
>
> I'd write my own version of enumerate with a step argument, an
On Thu, 21 Jul 2016 11:14 pm, Rustom Mody wrote:
> On Thursday, July 21, 2016 at 12:04:35 PM UTC+5:30, Steven D'Aprano wrote:
>> On Thursday 21 July 2016 15:28, Rustom Mody wrote:
>> > BTW APL whose main domain of application is scientific chooses to
>> > enshrine this —equality is ε-neighborhood
On Fri, Jul 22, 2016 at 2:07 AM, Malcolm Greene wrote:
> The source file we're generating has one main function (go) with some
> supporting functions and classes as well. Will there be any problems
> referencing additional functions or classes defined in the source that
> gets passed to exec ... a
On Wed, Jul 20, 2016 at 11:54 AM, Brendan Abel <007bren...@gmail.com> wrote:
> You could create your own generator that wraps enumerate
>
> def reverse_enumerate(iterable):
> for i, val in enumerate(reversed(iterable)):
> yield len(iterable) - 1 - i, val
>
> for i, val in reverse_enumer
We're writing a DSL parser that generates Python code. While the size of
our generated code will be small (< 32K), I wanted to re-assure the rest
of our team that there are no reasonable code size boundaries that we
need to be concerned about. I've searched for Python documentation that
covers max
On Fri, Jul 22, 2016 at 2:51 AM, Malcolm Greene wrote:
> We're writing a DSL parser that generates Python code. While the size of
> our generated code will be small (< 32K), I wanted to re-assure the rest
> of our team that there are no reasonable code size boundaries that we
> need to be concerne
> Heh, great question, and I'm curious too! But one place to get a bit more
> info is the standard library.
>
> rosuav@sikorsky:~/cpython/Lib$ find -name \*.py|xargs ls -lS|head
> -rw-r--r-- 1 rosuav rosuav 624122 Jul 17 17:38 ./pydoc_data/topics.py
Brilliant! :)
Thanks Chris!
Malcolm
--
http
On 7/21/2016 12:07 PM, Malcolm Greene wrote:
I assume that one downside to the exec() approach is that there is no
persistent namespace for this code's functions and classes, eg. after
the exec() completes, its namespace disappears and is not available to
code that follows?
Objects only disapp
Malcolm Greene wrote:
> We're writing a DSL parser that generates Python code. While the size of
> our generated code will be small (< 32K), I wanted to re-assure the rest
> of our team that there are no reasonable code size boundaries that we
> need to be concerned about. I've searched for Python
Steven D'Aprano writes:
> Or you might be using a language like Javascript, which intentionally has
> only floats for numbers. That's okay, you can still perform exact integer
> arithmetic, so long as you stay within the bounds of ±2**16.
Small point: it's 2**52.
--
Ben.
--
https://mail.pyth
On Thu, Jul 21, 2016 at 4:54 PM, Ben Bacarisse wrote:
> Steven D'Aprano writes:
>
> > Or you might be using a language like Javascript, which intentionally has
> > only floats for numbers. That's okay, you can still perform exact integer
> > arithmetic, so long as you stay within the bounds of
having a little trouble with defining functions. i have a doc called ch5.py and
when i was trying the following i had issues
"
Try It Out: Defining a Function
Try saving the following in your file for Chapter 5, ch5.py.def in_fridge():
try:
count = fridge[wanted_food]
I'm trying to modify some code to suit my purposes and I'm just trying to
filter results as necessary. Basically, the code is returning one of a number
from a subset of 150 numbers. I want to only do anything with it if the number
is a 'good' one. I'm by no means a Python programmer (C# for me b
On Fri, Jul 22, 2016 at 2:19 PM, Jordan Bayless wrote:
> I get various errors no matter what I do to this to try and make it work.
> Variable not defined. Referenced before assignment. etc etc. I'm lost. How do
> I make it work?
It might be easier if you post all your code. To be honest, what I
On Thursday, July 21, 2016 at 11:28:55 PM UTC-5, Chris Angelico wrote:
> On Fri, Jul 22, 2016 at 2:19 PM, Jordan Bayless wrote:
> > I get various errors no matter what I do to this to try and make it work.
> > Variable not defined. Referenced before assignment. etc etc. I'm lost. How
> > do I ma
On Fri, Jul 22, 2016 at 2:39 PM, Jordan Bayless wrote:
> it seems there's a) no case statement (WTF?) and b) I'm limited to how many
> elif statements I can use.
The latter isn't true; and you're not using elif anyway. With no case
statement, you get pushed to other, better ways of doing things,
> On Jul 22, 2016, at 12:39 AM, Jordan Bayless wrote:
>
> Posting the entire code snippet is tough because it's thousands of lines of
> code.
You could paste into a GitHub gist (https://gist.github.com/) and share the
link.
--
https://mail.python.org/mailman/listinfo/python-list
No, I tried using a bunch of elif statements earlier and when I added more than
around 3 of them it threw errors. I just assumed that was some kind of limit.
We both agree that's piss-poor, lazy coding. I'm just trying to find something
that works though. To this point, everything I try fails.
Jordan Bayless writes:
> desired = Id < 10 or Id > 133 or Id in good_ids
> When I try to validate whether I passed that check, I'm told there's a
> Name error and it's not defined (using the last line of the snippet
> above).
Id was called IDNum in your earlier pst
> Also, I guess I'm at a loss
HI There,
I'm using MySQLdb as the MySQL client. Recently I got a weird problem of this
library. After looking into it, I suspect the problem may related to the
conversion from unsigned long to PyLongObject.
Here is the detail, If you are familiar with MySQLdb, the following snippet is
a way t
On Fri, 22 Jul 2016 03:18 pm, Michael Selik wrote:
>
>> On Jul 22, 2016, at 12:39 AM, Jordan Bayless wrote:
>>
>> Posting the entire code snippet is tough because it's thousands of lines
>> of code.
>
> You could paste into a GitHub gist (https://gist.github.com/) and share
> the link.
Are yo
On Fri, Jul 22, 2016 at 3:26 PM, Jordan Bayless wrote:
> When I try to validate whether I passed that check, I'm told there's a Name
> error and it's not defined (using the last line of the snippet above).
You're still not posting (a) your code, or (b) the full traceback, so
it's not easy for us
On Fri, 22 Jul 2016 03:26 pm, Jordan Bayless wrote:
> No, I tried using a bunch of elif statements earlier and when I added more
> than around 3 of them it threw errors. I just assumed that was some kind
> of limit.
Right, because a 20+ years old programming language used by millions of
professi
41 matches
Mail list logo