Bug? Feature? setattr(foo, '3', 4) works!

2014-12-19 Thread Cem Karan
and not SyntaxError; I'd like to suggest special-casing this so that using getattr(), setattr(), and hasattr() in this way raise SyntaxError instead as I think that will be less astonishing. Thoughts? Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: resource based job queue manager

2014-12-20 Thread Cem Karan
if there is any established scheduler which can run the jobs from different servers too. Try SCOOP: https://code.google.com/p/scoop/ Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug? Feature? setattr(foo, '3', 4) works!

2014-12-20 Thread Cem Karan
On Dec 19, 2014, at 10:33 AM, random...@fastmail.us wrote: On Fri, Dec 19, 2014, at 07:23, Ben Finney wrote: Cem Karan cfkar...@gmail.com writes: I'd like to suggest that getattr(), setattr(), and hasattr() all be modified so that syntactically invalid statements raise SyntaxErrors. What

Re: Searching through more than one file.

2014-12-29 Thread Cem Karan
(https://docs.python.org/3/library/argparse.html) instead. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

[issue4830] regrtest.py -u largefile test_io fails on OS X 10.5.6

2009-01-04 Thread Cem Karan
New submission from Cem Karan cfkaran2+pyt...@gmail.com: I'm running OS X 10.5.6 (uname -a == Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386) I get the following error after compiling Python 3.0. Note that I have NOT installed

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2015-01-29 Thread Cem Karan
. Whenever you're done with it, you can merge the changes back into whatever you your group see as the real branch. That is the model I use at work, and it works fairly well, and its saved me once already when the laptop I was working on decided to die on me. Thanks, Cem Karan [1] http://nvie.com

Good PDF parser/form filler?

2015-03-20 Thread Cem Karan
problem for extension classes, etc.) - Ideally pure python with few dependencies. - NOT shoveling data out to the internet! MUST be wholly contained on my machine! Thanks in advance for any help! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Installed Python 3 on Mac OS X Yosemite but its still Python 2.7

2015-03-09 Thread Cem Karan
various mysterious failures after that. It may be that Yosemite fixes those failures, but I wouldn't bet on it. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-03-08 Thread Cem Karan
. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-03-02 Thread Cem Karan
On Feb 26, 2015, at 7:04 PM, Fabio Zadrozny fabi...@gmail.com wrote: On Wed, Feb 25, 2015 at 9:46 AM, Cem Karan cfkar...@gmail.com wrote: On Feb 24, 2015, at 8:23 AM, Fabio Zadrozny fabi...@gmail.com wrote: Hi Cem, I didn't read the whole long thread, but I thought I'd point you

Re: Design thought for callbacks

2015-03-02 Thread Cem Karan
On Feb 26, 2015, at 2:54 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Feb 26, 2015 4:00 AM, Cem Karan cfkar...@gmail.com wrote: On Feb 26, 2015, at 12:36 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Cem Karan wrote: I think I see what you're talking about now. Does

Re: Design thought for callbacks

2015-03-02 Thread Cem Karan
Ethan, that was precisely my problem. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
slightly less surprising by allowing the user to track them, releasing them when they aren't needed without having to figure out where the callbacks were registered. However, it appears I'm making things more surprising rather than less. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 12:27 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Cem Karan wrote: On Feb 21, 2015, at 8:15 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan cfkar...@gmail.com wrote: OK, so it would violate the principle

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:12 AM, Marko Rauhamaa ma...@pacujo.net wrote: Cem Karan cfkar...@gmail.com: On Feb 21, 2015, at 11:03 AM, Marko Rauhamaa ma...@pacujo.net wrote: I use callbacks all the time but haven't had any problems with strong references. I am careful to move my objects

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:24 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 11:07 PM, Cem Karan cfkar...@gmail.com wrote: Correct. The GUI engine ultimately owns everything. Of course, this is a very simple case (imagine a little notification popup; you don't care about

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:46 AM, Marko Rauhamaa ma...@pacujo.net wrote: Cem Karan cfkar...@gmail.com: On Feb 21, 2015, at 12:08 PM, Marko Rauhamaa ma...@pacujo.net wrote: Maybe the logic of the receiving object isn't prepared for the callback anymore after an intervening event. The problem

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
method of the object, or if I store the bound method directly, I suspect it will yield approximately the same results. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 11:03 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan cfkar...@gmail.com wrote: In order to inform users that certain bits of state have changed, I require them to register a callback with my code

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 3:57 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-21, Cem Karan cfkar...@gmail.com wrote: On Feb 21, 2015, at 12:42 AM, Chris Angelico ros...@gmail.com wrote: On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan cfkar...@gmail.com wrote: In order to inform users

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 10:55 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 2:45 AM, Cem Karan cfkar...@gmail.com wrote: OK, so if I'm reading your code correctly, you're breaking the cycle in your object graph by making the GUI the owner of the callback, correct? No other

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:52 AM, Laura Creighton l...@openend.se wrote: In a message of Sun, 22 Feb 2015 07:16:14 -0500, Cem Karan writes: This was PRECISELY the situation I was thinking about. My hope was to make the callback mechanism slightly less surprising by allowing the user to track

Re: Design thought for callbacks

2015-02-23 Thread Cem Karan
On Feb 22, 2015, at 5:29 PM, Laura Creighton l...@openend.se wrote: In a message of Sun, 22 Feb 2015 17:09:01 -0500, Cem Karan writes: Documentation is a given; it MUST be there. That said, documenting something, but still making it surprising, is a bad idea. For example, several people

Re: Design thought for callbacks

2015-02-25 Thread Cem Karan
at all times, so WeakMethod IS available to me. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-25 Thread Cem Karan
. I'm working out a possible API right now, once I have some code that I can use to illustrate what I'm thinking to everyone, I'll post it to the list. Thank you for showing me your code though, it is clever! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Design thought for callbacks

2015-02-20 Thread Cem Karan
, and if they are no longer alive, they are automatically removed from the WeakSet, preventing me from accidentally calling them when they are dead. My question is simple; is this a good design? If not, why not? Are there any potential 'gotchas' I should be worried about? Thanks, Cem Karan -- https

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 4:34 PM, Marko Rauhamaa ma...@pacujo.net wrote: Cem Karan cfkar...@gmail.com: My goal is to make things as pythonic (whatever that means in this case) and obvious as possible. Ideally, a novice can more or less guess what will happen with my API without really having

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 4:02 PM, Ethan Furman et...@stoneleaf.us wrote: On 02/22/2015 05:13 AM, Cem Karan wrote: Output: From Evil Zombie: Surprise! From Your Significant Other: Surprise! In this case, the user made an error (just as Marko said in his earlier message), and forgot about

Re: Design thought for callbacks

2015-02-24 Thread Cem Karan
I'm combining two messages into one, On Feb 24, 2015, at 12:29 AM, random...@fastmail.us wrote: On Tue, Feb 24, 2015, at 00:20, Gregory Ewing wrote: Cem Karan wrote: I tend to structure my code as a tree or DAG of objects. The owner refers to the owned object, but the owned object has

Re: Design thought for callbacks

2015-02-24 Thread Cem Karan
On Feb 23, 2015, at 7:29 AM, Frank Millman fr...@chagford.com wrote: Cem Karan cfkar...@gmail.com wrote in message news:a3c11a70-5846-4915-bb26-b23793b65...@gmail.com... Good questions! That was why I was asking about 'gotchas' with WeakSets originally. Honestly, the only way

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 9:36 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 1:07 AM, Cem Karan cfkar...@gmail.com wrote: I agree about closures; its the only way they could work. When I was originally thinking about the library, I was trying to include all types

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 12:42 AM, Chris Angelico ros...@gmail.com wrote: On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan cfkar...@gmail.com wrote: In order to inform users that certain bits of state have changed, I require them to register a callback with my code. The problem is that when I store

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 8:15 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan cfkar...@gmail.com wrote: OK, so it would violate the principle of least surprise for you. Interesting. Is this a general pattern in python? That is, callbacks are owned

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 12:41 AM, Frank Millman fr...@chagford.com wrote: Cem Karan cfkar...@gmail.com wrote in message news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... Hi all, I'm working on a project that will involve the use of callbacks, and I want to bounce an idea I had off

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 8:37 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/02/2015 05:41, Frank Millman wrote: Cem Karan cfkar...@gmail.com wrote in message news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... Hi all, I'm working on a project that will involve the use of callbacks

Re: Design thought for callbacks

2015-02-26 Thread Cem Karan
On Feb 26, 2015, at 12:36 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Cem Karan wrote: I think I see what you're talking about now. Does WeakMethod (https://docs.python.org/3/library/weakref.html#weakref.WeakMethod) solve this problem? Yes, that looks like it would work. Cool

Re: Diff between object graphs?

2015-04-24 Thread Cem Karan
On Apr 23, 2015, at 11:05 AM, Steve Smaldone smald...@gmail.com wrote: On Thu, Apr 23, 2015 at 6:34 AM, Cem Karan cfkar...@gmail.com wrote: On Apr 23, 2015, at 1:59 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thursday 23 April 2015 11:53, Cem Karan wrote

Re: Diff between object graphs?

2015-04-22 Thread Cem Karan
On Apr 22, 2015, at 8:53 AM, Peter Otten __pete...@web.de wrote: Cem Karan wrote: Hi all, I need some help. I'm working on a simple event-based simulator for my dissertation research. The simulator has state information that I want to analyze as a post-simulation step, so I currently save

Re: Diff between object graphs?

2015-04-22 Thread Cem Karan
On Apr 22, 2015, at 9:56 PM, Dave Angel da...@davea.name wrote: On 04/22/2015 09:46 PM, Chris Angelico wrote: On Thu, Apr 23, 2015 at 11:37 AM, Dave Angel da...@davea.name wrote: On 04/22/2015 09:30 PM, Cem Karan wrote: On Apr 22, 2015, at 8:53 AM, Peter Otten __pete...@web.de wrote

Re: Diff between object graphs?

2015-04-22 Thread Cem Karan
On Apr 22, 2015, at 9:46 PM, Chris Angelico ros...@gmail.com wrote: On Thu, Apr 23, 2015 at 11:37 AM, Dave Angel da...@davea.name wrote: On 04/22/2015 09:30 PM, Cem Karan wrote: On Apr 22, 2015, at 8:53 AM, Peter Otten __pete...@web.de wrote: Another slightly more involved idea

Re: Diff between object graphs?

2015-04-23 Thread Cem Karan
On Apr 23, 2015, at 1:59 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thursday 23 April 2015 11:53, Cem Karan wrote: Precisely. In order to make my simulations more realistic, I use a lot of random numbers. I can fake things by keeping the seed to the generator

Diff between object graphs?

2015-04-22 Thread Cem Karan
, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: To pickle or not to pickle

2015-05-08 Thread Cem Karan
, Cem Karan On May 8, 2015, at 5:58 AM, Cecil Westerhof ce...@decebal.nl wrote: I first used marshal in my filebasedMessages module. Then I read that you should not use it, because it changes per Python version and it was better to use pickle. So I did that and now I find: https

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Cem Karan
really save you. Good luck, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python instead of Bash

2015-05-31 Thread Cem Karan
will execute in # parallel. with concurrent.futures.ProcessPoolExecutor() as executor: for f in base_files: executor.submit(_convert_and_print, f) _print_files_in_order(base_files) Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Hello Group and how to practice?

2015-05-31 Thread Cem Karan
you CAN do with a computer; some things that look like they should be easy, are actually major research questions. Just keep trying, and it will get easier over time. Good luck! Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Hello Group and how to practice?

2015-05-31 Thread Cem Karan
On May 31, 2015, at 10:51 AM, Anders Johansen sko...@gmail.com wrote: Den søndag den 31. maj 2015 kl. 16.22.10 UTC+2 skrev Cem Karan: On May 31, 2015, at 9:35 AM, Anders Johansen sko...@gmail.com wrote: Hi my name is Anders I am from Denmark, and I am new to programming and python

Re: Best approach to create humongous amount of files

2015-05-21 Thread Cem Karan
be uniquely named. As a test, I ran the code above, but I killed the loop after about 10 minutes, at which point about 500,000 files were created. Note that my laptop is about 6 years old, so you might get better performance on your machine. Thanks, Cem Karan -- https://mail.python.org

Re: sys path modification

2015-07-27 Thread Cem Karan
/library/sys.html#sys.path), the first element of sys.path is the path to the directory of the script itself. If you modify this, you **will** break third-party code at some point. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: How can I count word frequency in a web site?

2015-11-29 Thread Cem Karan
You might want to look into Beautiful Soup (https://pypi.python.org/pypi/beautifulsoup4), which is an HTML screen-scraping tool. I've never used it, but I've heard good things about it. Good luck, Cem Karan On Nov 29, 2015, at 7:49 PM, ryguy7272 <ryanshu...@gmail.com> wrote: > I

Re: How to remove item from heap efficiently?

2016-01-13 Thread Cem Karan
On Jan 12, 2016, at 11:18 AM, "Sven R. Kunze" <srku...@mail.de> wrote: > On 12.01.2016 03:48, Cem Karan wrote: >> >> Jumping in late, but... >> >> If you want something that 'just works', you can use HeapDict: >> >> http://st

Re: How to remove item from heap efficiently?

2016-01-11 Thread Cem Karan
it in the past, and it works quite well. I haven't tested its asymptotic performance though, so you might want to check into that. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: me, my arm, my availability ...

2016-01-14 Thread Cem Karan
ntly, they did wonders for my knee a few years back. With luck, it'll be more or less outpatient surgery. Good luck, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove item from heap efficiently?

2016-01-14 Thread Cem Karan
On Jan 13, 2016, at 2:08 PM, Sven R. Kunze <srku...@mail.de> wrote: > On 13.01.2016 12:20, Cem Karan wrote: >> On Jan 12, 2016, at 11:18 AM, "Sven R. Kunze" <srku...@mail.de> wrote: >> >>> Thanks for replying here. I've come across these types of &g

Re: Heap Implementation

2016-02-08 Thread Cem Karan
On Feb 7, 2016, at 10:15 PM, srinivas devaki <mr.eightnotei...@gmail.com> wrote: > On Feb 8, 2016 7:07 AM, "Cem Karan" <cfkar...@gmail.com> wrote: > > I know that there are methods of handling this from the client-side (tuples > > with unique counters come to

Re: Heap Implementation

2016-02-08 Thread Cem Karan
On Feb 8, 2016, at 10:12 PM, srinivas devaki <mr.eightnotei...@gmail.com> wrote: > > On Feb 8, 2016 5:17 PM, "Cem Karan" <cfkar...@gmail.com> wrote: > > > > On Feb 7, 2016, at 10:15 PM, srinivas devaki <mr.eightnotei...@gmail.com> > > wro

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 4:40 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote: > On 09/02/2016 04:25, Cem Karan wrote: >> >> No problem, that's what I thought happened. And you're right, I'm looking >> for a priority queue (not the only reason to use a heap, but a

Re: Heap Implementation

2016-02-11 Thread Cem Karan
On Feb 10, 2016, at 1:23 PM, "Sven R. Kunze" <srku...@mail.de> wrote: > Hi Cem, > > On 08.02.2016 02:37, Cem Karan wrote: >> My apologies for not writing sooner, but work has been quite busy lately >> (and likely will be for some time to come). >

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 9:27 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote: > On 09/02/2016 11:44, Cem Karan wrote: >> >> On Feb 9, 2016, at 4:40 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote: >> >>> On 09/02/2016 04:25, Cem Karan wrote: >>>

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 8:27 PM, srinivas devaki <mr.eightnotei...@gmail.com> wrote: > > > On Feb 10, 2016 6:11 AM, "Cem Karan" <cfkar...@gmail.com> wrote: > > > > Eh, its not too bad once you figure out how to do it. It's easier in C > > tho

Re: A sets algorithm

2016-02-07 Thread Cem Karan
ce. The main purpose of these suggestions is to reduce the amount of reading you're doing. Storage tends to be slow, and any tricks that reduce the number of bytes you need to read in will be helpful to you. Good luck! Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Heap Implementation

2016-02-07 Thread Cem Karan
tiple times in a row. The priority is the moment in the future when the object will be called. As a result, items don't have unique priorities. I know that there are methods of handling this from the client-side (tuples with unique counters come to mind), but if your library can handle it direc

Re: Guido on python3 for beginners

2016-02-18 Thread Cem Karan
for scripts where you're suddenly surprised by Py2 starting up when you've been using a Py3 interactive interpreter. For me, I'd probably give my students a block of code that they are asked to copy at the start of their files to test for Py2 or Py3, and to raise an exception on Py2. After that, I just wouldn't worry about it. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Quote of the day

2016-05-17 Thread Cem Karan
aded and used a library that came with unit tests, which all passed. When I started using it, I kept getting odd errors. Digging into it, I discovered they had commented out the bodies of some of the unit tests... glad it was open source, at least I *could* dig into the code and figure out what was going on :/ Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-18 Thread Cem Karan
ly) lib/site-packages. > > > Hey Terry! > This needs to get into more public docs than a one-off post on a newsgroup/ML +1! This is the first I've heard of this, and it sounds INCREDIBLY useful! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Python replace multiple strings (m*n) combination

2017-02-25 Thread Cem Karan
it. The main problem with this method is how you're doing the replacements. If your replacement text can create a new string that matches a different regex that occurs later on, then you really should use what INADA Naoki suggested. Thanks, Cem Karan On Feb 25, 2017, at 2:08 PM, INADA Naoki

Re: The Joys Of Data-Driven Programming

2016-08-31 Thread Cem Karan
(https://ninja-build.org/)? I personally like it because of how simple it is, and the fact that it doesn't use leading tabs the way that make does. It is intended to be the assembler for higher-level build systems which are more like compilers. I personally use it as a make replacement because it does what I tell it to do, and nothing else. It may fit what you're after. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: The Joys Of Data-Driven Programming

2016-08-31 Thread Cem Karan
On Aug 31, 2016, at 9:02 AM, Paul Moore <p.f.mo...@gmail.com> wrote: > On 31 August 2016 at 13:49, Cem Karan <cfkar...@gmail.com> wrote: >>> Has anyone else found this to be the case? Is there any "make replacement" >>> out there that f

Re: Abusive Italian Spam

2016-09-30 Thread Cem Karan
Honestly, I'm impressed by how little spam ever makes it onto the list. Considering the absolute flood of email the lists get, it's impressive work. Thank you for all the hard work you guys do for all the rest of us! Thanks, Cem Karan On Sep 29, 2016, at 11:30 AM, Tim Golden &l

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 7:56 PM, Chris Angelico <ros...@gmail.com> wrote: > On Sun, Oct 2, 2016 at 10:47 AM, Cem Karan <cfkar...@gmail.com> wrote: >> Cool, thank you! Quick experimentation suggests that I don't need to worry >> about marking anything for garbage col

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 7:34 PM, breamore...@gmail.com wrote: > On Saturday, October 1, 2016 at 11:57:17 PM UTC+1, Cem Karan wrote: >> Hi all, I've all of a sudden gotten interested in the CPython interpreter, >> and started trying to understand how it ingests and runs byte

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 8:30 PM, Ned Batchelder <n...@nedbatchelder.com> wrote: > On Saturday, October 1, 2016 at 7:48:09 PM UTC-4, Cem Karan wrote: >> Cool, thank you! Quick experimentation suggests that I don't need to worry >> about marking anything for garbage collectio

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
I kind of got the feeling that was so from reading the docs in the source code. Too bad! :( Cem On Oct 1, 2016, at 7:53 PM, Paul Rubin <no.email@nospam.invalid> wrote: > Cem Karan <cfkar...@gmail.com> writes: >> how do I create a stream of byte codes that can be inte

Byte code descriptions somewhere?

2016-10-01 Thread Cem Karan
, etc.)? Basically, I want a manual similar to what Intel or AMD might put out for their chips so that all executables behave nicely with one another. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Byte code descriptions somewhere?

2016-10-01 Thread Cem Karan
my own byte array with bytes that CPython can directly interpret. Thanks, Cem Karan On Oct 1, 2016, at 7:02 PM, Ben Finney <ben+pyt...@benfinney.id.au> wrote: > Cem Karan <cfkar...@gmail.com> writes: > >> Hi all, I've all of a sudden gotten interested in the CPython >

Who owns the memory in ctypes?

2016-11-14 Thread Cem Karan
it and attempt to dispose of it when it goes out of scope? Ideally, the memory is owned by the side that created it, with the other side simply referencing it, but I want to be sure before I invest a lot of time interfacing the two sides together. Thanks, Cem Karan -- https://mail.python.org

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-04-24 Thread Cem Karan
nyone done anything like this before? > > I know that experiments have been done. > Have you tried searching 'Python bdwgc garbage collection' or similar? I did google around a bit, but the results I found weren't relevant. I was hoping someone else on the list had tried, and simply ha

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-04-26 Thread Cem Karan
(which is part of the python C API) is probably not going to work. I got interrupted (again) so I didn't have a chance to try the next trick and register the ctypes objects as roots from which to scan in bdwgc, but I'm hoping that roots aren't removed. If that works, I'll post it to the list. Tha

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-04-25 Thread Cem Karan
s a really clever idea… I'm not near the machine that I could test it on right now, but I'll give it a shot tomorrow and see how it works. I'll let everyone know what I find out. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Survey: improving the Python std lib docs

2017-05-17 Thread Cem Karan
at least somewhat useful. I'd like to see complete signatures in the docstrings, so when I use help() on something that has *args or **kwargs I can see what the arguments actually are. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Progress on the Gilectomy

2017-06-20 Thread Cem Karan
On Jun 20, 2017, at 1:19 AM, Paul Rubin <no.email@nospam.invalid> wrote: > Cem Karan <cfkar...@gmail.com> writes: >> Can you give examples of how it's not reliable? > > Basically there's a chance of it leaking memory by mistaking a data word > for a pointe

Re: Progress on the Gilectomy

2017-06-19 Thread Cem Karan
allocated from python's garbage collected heap on the C-side. Lot fewer headaches. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: pip list --outdated gives all packages

2017-05-27 Thread Cem Karan
ferent, so my scripts would work as an ordinary user and then fail as root. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: pip list --outdated gives all packages

2017-05-28 Thread Cem Karan
On May 27, 2017, at 11:10 AM, Cecil Westerhof <ce...@decebal.nl> wrote: > On Saturday 27 May 2017 16:34 CEST, Cem Karan wrote: > >> >> On May 27, 2017, at 7:15 AM, Cecil Westerhof <ce...@decebal.nl> wrote: >> >>> On Saturday 27 May 2017 12:33 C

Re: pip list --outdated gives all packages

2017-05-30 Thread Cem Karan
ied it. (Where some problems. Looks like you can not do certain > things in VirtualBox. But that is for another time.) > Get the same result. So maybe I should put it on the Debian list. Yeah, I have no idea what to tell you. Good luck! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list