Would it be possible to extend the methods of the decimal module just a bit to
include atan(), sin(), cos(), and exp() ?
The module has methods for ln() and sqrt(); and that's great!
I have done some rudimentary searching of the pep history and I'm not finding
any pep related to extending the d
>
> Any suggestions? Thanks in advance!
>
>
Switch to Gnu/Linux.
Which version of tcl/tk is installed. I would guess that tkinter is honked up
somehow... did you clear up the old tkinter stuff?
--
https://mail.python.org/mailman/listinfo/python-list
>
> The version of tcl/tk is completely irrelevant as it comes bundled in
>
> the Python msi installer.
>
Does the previous version put stuff into the registry that keeps the new
version from running correctly?
--
https://mail.python.org/mailman/listinfo/python-list
>
> The decimal module implements IEEE 854
>
Thanks Terry... ... long time.
I would like to find out if there is some iron-clad policy about extending the
implementation of an IEEE standard... decimal module in this case; I'm just
thinking that this particular extension really fits the pyt
On Tuesday, February 18, 2014 8:56:51 AM UTC-6, eglows...@gmail.com wrote:
> Any suggestions? Thanks in advance!
>
Is there any possibility that you are bumping up against open IDLE Issue 14576?
http://bugs.python.org/issue14576
--
https://mail.python.org/mailman/listinfo/python-list
>
> Have you looked at the gmpy2 ( https://code.google.com/p/gmpy/ ) module?
>
> casevh
No... was not aware of gmpy2... looks like a great project! I am wondering
why it would be sooo much faster? I was hoping that Stefan Krah's C
accelerator was using FFT fast fourier transforms for mul
On Wednesday, February 19, 2014 4:29:27 PM UTC-6, Oscar Benjamin wrote:
> Actually the performance difference isn't as big as you might think.
>
> Oscar
You're right. At least my own benchmark on my native exp() vs the built-in
was about ~same ~same.
I was hoping that Stefan had used FFT...
ideration.
Oh, and one more thing... whoever is doing the work on IDLE these days, nice
job! It is stable, reliable, and just works/ appreciate it!
Kind regards,
Mark H Harris
--
https://mail.python.org/mailman/listinfo/python-list
hi folks,
Its been too long... can't remember... are there rules here about posting
code snippets, or length considerations, and so forth?
Seems like there was a place to share code snips outside of the message
area?
A related question, is there a python repository for uploading p
On Friday, February 21, 2014 12:37:59 AM UTC-6, Sam wrote:
> I need to pass a global variable into a python function. However, the global
> variable does not seem to be assigned after the function ends. Is it because
> parameters are not passed by reference? How can I get function parameters to
On Thursday, February 27, 2014 9:01:50 AM UTC-6, Jerry Hill wrote:
> --
>
> Jerry
Thanks guys, perfect. 'preciate it!
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, February 27, 2014 8:42:55 AM UTC-6, Oscar Benjamin wrote:
>
> Some points:
Thanks so much... you have clarified some things I was struggling with...
> 1) Why have you committed the code as a .tar.gz file?
um, to save space... well, I know its tiny, but its just a habit I ha
On Thursday, February 27, 2014 10:24:23 AM UTC-6, Oscar Benjamin wrote:
from decimal import Decimal as D
> >>> D(0.1)
> Decimal('0.155511151231257827021181583404541015625')
>
hi Oscar, well, that's not what I'm doing with my D()... I'm not just
making D() mimic Decimal.
On Thursday, February 27, 2014 4:15:16 PM UTC-6, Ben Finney wrote:
>
> Post your code in-line with your message. This is for the sake of the
> people whose time you're requesting, and of later readers who will find
> the thread when searching the archives -- URLs to snippets are likely to
> be in
On Thursday, February 27, 2014 11:54:44 AM UTC-6, Ned Batchelder wrote:
> Mark, thanks for helping to answer the OP's question. We've covered (in
> depth) in the rest of this thread, that Python *does* have the concept
> of a variable, it just behaves differently than some other popular
> pro
On Thursday, February 27, 2014 5:50:55 PM UTC-6, Oscar Benjamin wrote:
> . . . Calling Decimal on a float performs an exact binary to
> decimal conversion. Your reasoning essentially assumes that every
> float should be interpreted as an approximate representation for a
> nearby decimal value.
On Thursday, February 27, 2014 8:07:20 PM UTC-6, Steven D'Aprano wrote:
> If they point to the same piece of memory -- which, by the way, can be
> moved around if the garbage collector supports it -- then A is B cannot
> possibly return False.
>
hi Steve, long time, yes, my whole point exac
On Thursday, February 27, 2014 9:15:36 PM UTC-6, Steven D'Aprano wrote:
> Decimal uses base 10, so it is a better fit for numbers we
> write out in base 10 like "0.12345", but otherwise it suffers from the
> same sort of floating point rounding issues as floats do.
>
>
> py> Decimal('1.2345'
On Thursday, February 27, 2014 10:26:59 PM UTC-6, Chris Angelico wrote:
> Create Decimal values from strings, not from the str() of a float,
> which first rounds in binary and then rounds in decimal.
>
Thanks Chris... another excellent point... ok, you guys have about convinced
me (which is sp
On Thursday, February 27, 2014 10:43:23 PM UTC-6, Chris Angelico wrote:
> Simple rule of thumb: Never use 'is' with strings or ints. They're
> immutable, their identities should be their values. Playing with 'is'
> will only confuse you, unless you're specifically going for
> introspection and su
On Friday, February 28, 2014 9:50:09 AM UTC-6, Steven D'Aprano wrote:
> > PS On the topic of enums, when are we getting support for a switch
> > statement?
> http://legacy.python.org/dev/peps/pep-3103/
> http://legacy.python.org/dev/peps/pep-0275/
>
I have reviewed these peps, and I heard Guido
On Friday, February 28, 2014 8:41:49 AM UTC-6, Wolfgang Maier wrote:
> Hi Mark,
>
> here is an enhancement for your epx function.
>
> Wolfgang
hi Wolfgang, thanks much! As a matter of point in fact, I ran into this
little snag and didn't understand it, because I was thinking that outside o
On Friday, February 28, 2014 2:54:12 AM UTC-6, Wolfgang Maier wrote:
> Since by now, I guess, we all agree that using the string representation is
> the wrong approach, you can simply use Decimal instead of D() throughout
> your code.
> Best,
> Wolfgang
hi Wolfgang, ...right... I'm going to
On Friday, February 28, 2014 9:11:49 AM UTC-6, Steven D'Aprano wrote:
> >> Now that Python has a fast C implementation of Decimal, I would be
> >> happy for Python 4000 to default to decimal floats, and require special
> >> syntax for binary floats. Say, 0.1b if you want a binary float, and 0.1
>
On Friday, February 28, 2014 12:37:37 PM UTC-6, Chris Angelico wrote:
>
> Are you aware that IEEE 754 includes specs for decimal floats? :)
>
Yes. I am from back in the day... way back... so 754 1985 is what I have
been referring to.
IEEE 854 1987 and the generalized IEEE 754 2008 have
On Friday, February 28, 2014 1:34:27 AM UTC-6, Steven D'Aprano wrote:
> Now that Python has a fast C implementation of Decimal, I would be happy
> for Python 4000 to default to decimal floats, and require special syntax
> for binary floats. Say, 0.1b if you want a binary float, and 0.1 for a
>
On Friday, February 28, 2014 1:39:11 PM UTC-6, Mark H. Harris wrote:
> On Friday, February 28, 2014 1:34:27 AM UTC-6, Steven D'Aprano wrote:
>
>
>
> > Now that Python has a fast C implementation of Decimal, I would be happy
>
> > for Python 4000 to defaul
On Friday, February 28, 2014 1:20:52 PM UTC-6, Marko Rauhamaa wrote:
>
> Which do *you* find more readable?
>
Yep, my point exactly. nice illustration.
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, February 28, 2014 3:03:25 PM UTC-6, Marko Rauhamaa wrote:
>
> Marko
... and between me and you, here is a snip from dmath.py from the atan(x)
function:
if (n**2 < D(1)):
a = __atan__(n)
elif (n == D(1)):
a = gpi/4
elif (n == D(-1)):
a = -(gpi/4
On Thursday, February 27, 2014 10:01:39 AM UTC-6, Eric Jacoboni wrote:
>
> ('spam', [10, 30, 20], 'eggs')
>
> I get a TypeError for an illegal operation, but this operation is still
>
> completed?
hi Eric, others have answered your question specifically, but the issue (which
is recurring) b
On Friday, February 28, 2014 6:40:06 PM UTC-6, Ned Batchelder wrote:
>
> I don't understand: you show an if/elif chain that cannot be expressed
> as a switch statement (because it uses < ), and then conclude that
> Python needs a switch statement? That doesn't make any sense.
>
Forgive me.
On Friday, February 28, 2014 7:10:49 PM UTC-6, Mark Lawrence wrote:
> I think you're talking nonsense. I've been happily using dict dispatch
> tables for years and, like Steven and presumably many others, find them
> dead easy to read. Perhaps you should invest in a better optician
> and/or g
On Friday, February 28, 2014 8:15:38 PM UTC-6, Ned Batchelder wrote:
> Mark, if you are going to advocate for a feature, find a good use case,
> this one is absurd. Where did the constants GT_1 etc, come from?
Not at all. Think of the C switch block... if you read about it in the K & R
you'l
On Friday, February 28, 2014 7:27:17 PM UTC-6, Eric Jacoboni wrote:
> I agree with that too... My error was to first consider the list, then
> the tuple... I should have considered the tuple first...
> Anyway, the TypeError should rollback, not commit the mistake.
I believe so too, but I'm not o
On Friday, February 28, 2014 8:01:45 PM UTC-6, Chris Angelico wrote:
>
> Does your switch construct have to handle the magic of GT_1 meaning ">
> 1", or do you first figure out where it falls with an if/elif tree?
> ChrisA
hi Chris, yeah... well think again of the switch block in C... the
On Friday, February 28, 2014 11:34:56 PM UTC-6, Ian wrote:
> One very common example of tuples containing lists is when lists are
> passed to any function that accepts *args, because the extra arguments
> are passed in a tuple. A similarly common example is when returning
> multiple objects from
On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
> How would you propose doing that? Bear in mind that while Python
> knows that tuples specifically are immutable, it doesn't generally
> know whether a type is immutable.
hi Ian, consider the problem... its a "cake" and "eat it too
On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
> How would you propose doing that? Bear in mind that while Python
> knows that tuples specifically are immutable, it doesn't generally
> know whether a type is immutable.
I was going to bed, and then thought of the solution. Allow th
On Saturday, March 1, 2014 8:54:43 AM UTC-6, Mark Lawrence wrote:
> you're also using google groups... it doesn't wrap paragraphs
>
> correctly... please read and action this
>
> https://wiki.python.org/moin/GoogleGroupsPython... it does wrap
>
> paragraphs correctly... it also prevents
On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
> How would you propose doing that? Bear in mind that while Python
> knows that tuples specifically are immutable, it doesn't generally
> know whether a type is immutable.
hi Ian, I thought of something else after I slept on it, so to
On Saturday, March 1, 2014 12:24:15 AM UTC-6, Chris Angelico wrote:
> much code. If you want to change anything, you potentially have to
>
> edit three places: the list of constants at the top, the condition
>
> function, and the switch.
>
>
>
> This can't be your idea of readability. Show me
On Saturday, March 1, 2014 4:01:12 PM UTC-6, Mark Lawrence wrote:
>
> No elipses, just the paragraphs not wrapped and the double line spacing.
>
> Good old gg, I just love it.
How do I fix it? Is there a setting someplace? I tried pulling up the page
you linked, but blank.
Thanks in adv
On Sunday, February 23, 2014 2:43:14 AM UTC-6, twiz wrote:
> I'm sure this is a common question but I can't seem to find a previous thread
> that addresses it. If one one exists, please point me to it.
My personal preference for writing and testing python code is Gnu/Linux as a
platform (free
On Saturday, March 1, 2014 4:36:07 PM UTC-6, Ben Finney wrote:
> Since when is the absence of action an "attempt" to do anything?
>
> You're assuming the not-doing of something must have a purpose. That
> assumption doesn't seem justified.
Correct. Argument from silence is logical fallacy; lack
On Saturday, March 1, 2014 5:21:57 PM UTC-6, Mark Lawrence wrote:
> https://wiki.python.org/moin/GoogleGroupsPython
Thanks, Mark. Whoohoo! Looks like gg has some work to do. rats(). Ok, so I'm
typing away here and when
I get to the boarder I should press the enter key so that the text is forced
On Saturday, March 1, 2014 12:55:07 AM UTC-6, Anssi Saari wrote:
> I recently watched a presentation by Jessica McKellar of PSF about what
> Python needs to stay popular. Other than the obvious bits (difficulties
> of limited support of Python on major platforms like Windows and mobile)
> the sligh
On Saturday, March 1, 2014 3:21:44 PM UTC-6, Mark H. Harris wrote:
> On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
hi Ian, I thought of something else after I slept on it, so to speak.
Consider this:
>>> s=(2,3,[42,43,44],7)
>>> s[2]
[42, 43, 44]
>
On Saturday, March 1, 2014 8:04:32 PM UTC-6, Eric Jacoboni wrote:
>
>
> In fact, i think i'm gonna forget += on lists :)
hi Eric, well, that might be extreme, but you certainly want to avoid
trying to change an immutable. Something you might want to consider
is trying something like creating a n
hi folks,
Python Decimal Library dmath.py v0.3 Released
https://code.google.com/p/pythondecimallibrary/
This code provides the C accelerated decimal module with
scientific/transcendental functions for arbitrary precision.
I have also included pilib.py which is a PI library of historic
algorith
On Monday, March 3, 2014 5:34:30 AM UTC-6, Mark H. Harris wrote:
> hi folks,
Terry, I posted this mod as an idea on python-ideas, as you suggested.
Also, I made the additional suggestion that decimal floating point be
considered as the primary floating point type for python4.x, with
On Monday, March 3, 2014 3:42:30 AM UTC-6, ast wrote:
> Consider following code:
>
> >>> A=7
> >>> B=7
> >>> A is B
> True
The names A and B are both bound to the same object (7).
You will discover that this is True for all small ints less
than 257; on CPython3.3.4. I just checked it. :)
I
On Monday, March 3, 2014 7:34:40 AM UTC-6, Oscar Benjamin wrote:
> Python Decimal Library dmathlib.py v0.3 Released
> https://code.google.com/p/pythondecimallibrary/
> Is this available on PyPI? It seems there already is a "dmath" package
> on PyPI that was written by someone else some time ago
On Monday, March 3, 2014 7:34:40 AM UTC-6, Oscar Benjamin wrote:
> On 3 March 2014 11:34, Mark H. Harris wrote:
>
> Is this available on PyPI? It seems there already is a "dmath" package
> on PyPI that was written by someone else some time ago so you might
> nee
On Monday, March 3, 2014 10:44:16 AM UTC-6, Oscar Benjamin wrote:
> Is it on PyPI though? I was referring to a PyPI name so that people
> could install it with "pip install pdeclib"
> Oscar
hi Oscar, I'm sorry, I completely missed the point of your question. No its not
on PyPI, but I don't mind
On Monday, March 3, 2014 11:23:13 AM UTC-6, Wolfgang Maier wrote:
> def fact(x):
> """ fact(x)factorial{x} int x > 0
>
> return +Decimal(math.factorial(x))
> to make it return a Decimal rounded to context precision?
hi Wolfgang, I'm not sure. We're doing some things wit
hi folks,
I am having a fit with pip this afternoon. I finally
got pip installed on this system from a binary
blob (what nightmare, talk about 1987). Anyway,
pip is installed, but when I go to PyPI to pull
down distutils is gives a message that no such
package exists. I feel like Obeewan; "i
On Monday, March 3, 2014 2:03:19 PM UTC-6, Mark H. Harris wrote:
> On Monday, March 3, 2014 11:23:13 AM UTC-6, Wolfgang Maier wrote:
Wolfgang, answer is not so much, in fact, not at all.
But it is an interesting question for me; where I am
continuing to learn the limits of Decimal, and
On Monday, March 3, 2014 2:53:00 PM UTC-6, Mark Lawrence wrote:
> distutils has been part of the standard library for years.
hi Mark, that's fabulous, why can't I import it? Because I'm doing
something wrong of course. :)
marcus
--
https://mail.python.org/mailman/listinfo/python-list
On Monday, March 3, 2014 3:32:43 PM UTC-6, Robert Kern wrote:
> Probably. If you want us to help, you need to show us what you tried, tell us
> what results you expected, and copy-paste the output that you got.
> Robert Kern
hi Robert, well, I finally came up with trying to find setup(). Its
On Monday, March 3, 2014 3:18:37 PM UTC-6, Mark H. Harris wrote:
Yeah, you can set Emin & Emax enormously large (or small), can set
off overflow, and set clamping.
I am needing a small utility (tk?) that will allow the context to be set
manually by the interactive user dynamically (f
On Monday, March 3, 2014 4:15:39 PM UTC-6, Wolfgang Maier wrote:
> Well, that may be your use-case, but then math.factorial is for you.
> On the other hand, you may be interested in getting
> context-rounded factorials and rounding to context
> precision is what you'd expect from a Decimal func
On Monday, March 3, 2014 4:11:44 PM UTC-6, Robert Kern wrote:
>http://docs.python.org/3/distutils/index.html
> Robert Kern
hi Robert, I'm not whining --really-- but there is so dang much
doc out there on how to upload a package to PyPI with every tool
under the sun and all of them fancier t
On Monday, March 3, 2014 4:44:27 PM UTC-6, Wolfgang Maier wrote:
> decimal can handle BIGNUMS fairly well, you just need to increase context
> Emax. Have you ever tried to calculate stuff with ints as big as MAX_EMAX
> (10**99) or even close to it and still had a responsive
> sy
On Monday, March 3, 2014 5:34:30 AM UTC-6, Mark H. Harris wrote:
> https://code.google.com/p/pythondecimallibrary/
I released my pdeclib module this afternoon on PyPI here:
https://pypi.python.org/pypi/pdeclib/0.3
The tarball.gz may be downloaded and installed with:
pip inst
python convention perhaps.
Best regards,
Mark H Harris
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, March 4, 2014 5:03:13 PM UTC-6, notbob wrote:
{snip}
hi notbob,
Get a good book on python3 programming {Barnes and Noble,
Amazon} and please, start with python (3).
Great book: & fabulous tutorial:
Summerfield, Mark. Programming in Python 3: A Complete Introduction to the
Py
On Monday, March 3, 2014 7:46:38 PM UTC-6, Mark H. Harris wrote:
> On Monday, March 3, 2014 5:34:30 AM UTC-6, Mark H. Harris wrote:
>
> > https://code.google.com/p/pythondecimallibrary/
>
>https://pypi.python.org/pypi/pdeclib/0.3
Greetings, just a minor update here for v
On Wednesday, March 5, 2014 2:26:12 AM UTC-6, Steven D'Aprano wrote:
> On Wed, 05 Mar 2014 08:37:42 +0200, Marko Rauhamaa wrote:
>
> > If you had tried Python 30 years ago, you'd give it up for any serious
> > work because it would be so slow and consume so much memory.
>
> /facepalm
>
> Python i
On Wednesday, March 5, 2014 9:47:40 AM UTC-6, Steven D'Aprano wrote:
> Seriously, Lisp is not only one of the oldest high-level languages
> around, being almost as old as Fortran and Cobol, but it was one of the
> biggest languages of the 1970s and even into the 80s.
Lisp was specified by Joh
On Wednesday, March 5, 2014 6:24:52 PM UTC-6, Dennis Lee Bieber wrote:
> I must have had a deprived life...
>
> The only "debug" on a home system I ever used was the one in LS-DOS.
> And even then, it was only because an OS update disk arrived with a bad
> sector and could not be copie
test please disregard
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, March 5, 2014 7:40:05 PM UTC-6, MRAB wrote:
>
> The 6502 came from MOS Technology. Motorola made the 6800.
Well, not exactly. The MOS 6502 is to the Motorola 6800 what the Zilog
Z80 was to the Intel 8080.
The same engineers who designed the 6800 moved out and then designed
On Thursday, March 6, 2014 6:28:58 PM UTC-6, Dennis Lee Bieber wrote:
>
> The 6502 was NOT a Motorola chip (they had the 6800). The 6502 was MOS
That's funny... did you not see what I wrote back to MRAB? Here:
The MOS 6502 is to the Motorola 6800 what the Zilog Z80 was to the Intel 8080
disregard
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, March 6, 2014 8:13:02 PM UTC-6, MRAB wrote:
>
> The Z80's architecture and instruction set is a superset of that of the
> 8080; the 6502's architecture and instruction set isn't a superset of,
> or even compatible with, that of the 6800 (although it can use the same
> I/O, etc, chips)
On Sunday, March 9, 2014 2:09:25 PM UTC-5, Gary Herron wrote:
> i have no idea how to retrieve indexed images stored in ordered dictionary,
> using its values like : blue,green,red mean along with contrast, energy,
> homogeneity and correlation. as i have calculated the euclidean distance and
>
else:
line_count = 0
while True:
linein = fh.readline()
if (linein!=''):
lineout = linein.strip('\n')
length = len(lineout)
yield((line_count, length, lineout))
line_count+=1
test
--
https://mail.python.org/mailman/listinfo/python-list
On 3/15/14 4:56 PM, MRAB wrote:
I don't like how it always swallows the exception, so you can't tell
whether the file doesn't exist or exists but is empty, and no way to
specify the file's encoding.
Yes, the error handling needs more robustness/ and instead of printing
the errcode, my actual m
On 3/15/14 4:56 PM, MRAB wrote:
def fName(filename):
try:
with open(filename, 'r') as fh:
for linein in fh:
yield linein.strip('\n')
except FileNotFoundError as err_code:
print(err_code)
[snip]
The "with" confuses me because I am not sure s
On 3/15/14 4:56 PM, MRAB wrote:
You can also shorten it somewhat:
Thanks, I like it... I shortened the fnName() also:
#-
# fn2Name(filename) generator: file reader iterable
#-
de
On 3/15/14 8:32 PM, Mark Lawrence wrote:
Start here
http://docs.python.org/3/library/stdtypes.html#context-manager-types
Thanks Mark. I have three books open, and that doc, and wading through.
You might like to know (as an aside) that I'm done with gg. Got back up
here with a real news read
On 3/15/14 9:01 PM, Steven D'Aprano wrote:
Reading from files is already pretty simple. I would expect that it will
be harder to learn the specific details of custom, specialised, file
readers that *almost*, but not quite, do what you want, than to just
write a couple of lines of code to do what
On 3/15/14 8:48 PM, Travis Griggs wrote:
On Mar 15, 2014, at 14:24, Mark H Harris wrote:
test
Pass
Thanks Travis. I hated doing that.
I have been having a fit with gg, and its taken just a little time to
get a real news-reader client for posting. What a fit. Google does
really well
On 3/15/14 10:48 PM, Chris Angelico wrote:
There's a cost to refactoring. Suddenly there's a new primitive on the
board - a new piece of language . . . Splitting out all sorts of things into
generators when you could use well-known primitives like enumerate
gets expensive fast {snip}
[1] https:
On 3/16/14 12:41 AM, Chris Angelico wrote:
Good stuff Chris, and thanks for the footnotes, I appreciate it.
If getline() is doing nothing that the primitive doesn't, and
getnumline is just enumerate, then they're not achieving anything
beyond shielding you from the primitives.
Yes.
On 3/15/14 11:26 AM, Jayanth Koushik wrote:
This is a very interesting philosophical question, one which I am
surprised no one has answered; although, I think the reason for that
might be entirely obvious.
You actually answered your own question, as you were asking it. If the
doc says "whate
On 3/16/14 5:07 AM, Chris “Kwpolska” Warrick wrote:
Why not use the mailing list instead? It’s a much easier way to
access this place.
I prefer to 'pull' rather than receive the 'push'.
The newsreader idea is better because threading works better, and
because the interface is simpler. I don't
On 3/17/14 12:03 PM, Chris Angelico wrote:
ast.dump(ast.parse("complex( 3 +2j )"))
"Module(body=[Expr(value=Call(func=Name(id='complex', ctx=Load()),
args=[BinOp(left=Num(n=3), op=Add(), right=Num(n=2j))], keywords=[],
starargs=None, kwargs=None))])"
The sole argument to complex() is an expr
On 3/17/14 12:03 PM, Mark Lawrence wrote:
Thunderbird and gmane, FWIW on Windows 7.
I moved my news reader stuff like comp.lang.python over to my
Thunderbird mail client yesterday; works well and is as functional
as sea-monkey ever was. The client is nice and has none of the
short-comings of g
On 3/17/14 11:52 PM, Steven D'Aprano wrote:
On Mon, 17 Mar 2014 11:18:56 -0500, Mark H Harris wrote:
Who knows, beats me.
With respect, that's just because you would make a lousy language
designer :-)
Ouch;-)
"How should one spell a complex number?" There is p
On 3/17/14 8:06 AM, Frank Millman wrote:
All my source code resides on an old Linux server, which I switch on in the
morning and switch off at night, but otherwise hardly ever look at. It uses
'samba' to allow sharing with Windows, and 'nfs' to allow sharing with other
Linux machines.
hi Frank,
On 3/20/14 9:58 AM, notbob wrote:
I've installed python 3.3 on my Slack box, which by default comes with
python 2.7. I know how to fire up the different IDLE environments,
but how do I differentiate between the scripts?
hi notbob, the two (or more) IDLE environments run very nicely
side-by-s
On 3/20/14 12:23 PM, notbob wrote:
What the heck is a .pyc file and how are they created? Actually, I
can see it's a compiled binary, but I where did it come from?
The world according to me: python is an interpreter (vs compiler) which
converts your source code into tokens and then into a
On 3/20/14 12:47 PM, Marko Rauhamaa wrote:
I've seen it done, but at least in those Python 2 days the pyc format
changed between minor releases of Python, so Python itself had to be
shipped with the pyc files.
hi Marko, yeah, I have not done this; being that the concept is contrary
to my princ
On 3/20/14 2:53 PM, Alan Meyer wrote:
#!/usr/bin/env python
Only use the "python2" or "python3" versions if you really have a reason
to do so.
It gets tricky for distribution (you need docs for your distros, imho)
because #!/usr/bin/env python means different things on different
systems.
On 3/20/14 4:28 PM, notbob wrote:
No wonder the latest O'Reilly book, Learning Python, 5th ed,
is 1600 pgs. I coulda swore someone sed python is easy. ;)
nb
Python is easy, but its not simple.
Python is elegant, and full of art, but it has no paucity of constructs,
types, and opportunities
On 3/20/14 6:16 PM, fienspr...@gmail.com wrote:
def TheProc(c_int): fpgui.fpgFormWindowTitle(0, 'Boum')
return 0
TheProcF = CMPFUNC(TheProc)
Traceback (most recent call last): File "_ctypes/callbacks.c",
line 314, in 'calling callback function' TypeError: TheProc() takes
exactly 1 argument
On 3/21/14 7:02 AM, fienspr...@gmail.com wrote:
Yep, Many thanks for help
Hum, i have find the solution, it was in "CallBack function" in help-doc.
No, it was not in the "CallBack function" in help-doc ...
def TheProc(): <== you moved c_int from here ...
f
On 3/21/14 10:28 AM, Antony Joseph wrote:
How can i implement multiprocessing without inherit file descriptors
from my parent process?
I'll bite...
If what you mean by 'multiprocessing' is forking a process, to get a
child process, which will then do some parallel processing for some
reason,
1 - 100 of 289 matches
Mail list logo