Re: Question about Pass-by-object-reference?

2014-07-23 Thread Steven D'Aprano
On Wed, 23 Jul 2014 18:51:47 -0400, Terry Reedy wrote: > On 7/23/2014 1:35 AM, Steven D'Aprano wrote: >> On Wed, 23 Jul 2014 11:59:45 +1000, Ben Finney wrote: >> >>> fl writes: >>> On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: >>> The point being made is that no values are

Re: Question about asyncio doc example

2014-07-23 Thread Terry Reedy
On 7/23/2014 6:43 AM, Saimadhav Heblikar wrote: Hi, The example in question is https://docs.python.org/3/library/asyncio-task.html#example-hello-world-coroutine. I'd like to learn the purpose of the statement "yield from asyncio.sleep(2)" in that example. In particular, I'd like to know if asyn

Re: Question about Pass-by-object-reference?

2014-07-23 Thread Terry Reedy
On 7/23/2014 1:35 AM, Steven D'Aprano wrote: On Wed, 23 Jul 2014 11:59:45 +1000, Ben Finney wrote: fl writes: On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: When you call a function, Python binds function parameter names to argument objects in the function's local namespace,

Re: Question about Pass-by-object-reference?

2014-07-23 Thread Terry Reedy
On 7/23/2014 1:36 AM, Steven D'Aprano wrote: On Tue, 22 Jul 2014 20:27:15 -0400, Terry Reedy wrote: When you call a function, Python binds function parameter names to argument objects in the function's local namespace, the same as in name assignments. Given def f(a, b): pass a call f(1, 'x')

Re: Question about asyncio doc example

2014-07-23 Thread Yaşar Arabacı
asyncio.sleep() returns you a Future. When you yield from a future, your coroutine blocks, until the Future completes. In the meantime, event loop continutes to execute other things that are waiting to be executed. The Future returned from asyncio.sleep gets completed after specified seconds. 2014

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Ben Finney
Steven D'Aprano writes: > On Wed, 23 Jul 2014 11:59:45 +1000, Ben Finney wrote: > > fl writes: > >> On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: > >> > Nothing is being 'passed'. > >> > >> Thanks, but I don't understand your point yet. Could you give me > >> another example in

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 3:35 PM, Steven D'Aprano wrote: > If you say "nothing is being passed", then my response would be "Oh, you > aren't calling the function at all? Or just calling it with no arguments?" The latter. Suppose you have a class method that takes optional args, and you override it

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Steven D'Aprano
On Tue, 22 Jul 2014 20:27:15 -0400, Terry Reedy wrote: > When you call a function, Python binds function parameter names to > argument objects in the function's local namespace, the same as in name > assignments. Given > > def f(a, b): pass > > a call f(1, 'x') starts by executing > > a, b = 1,

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Steven D'Aprano
On Wed, 23 Jul 2014 11:59:45 +1000, Ben Finney wrote: > fl writes: > >> On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: >> > When you call a function, Python binds function parameter names to >> > argument objects in the function's local namespace, the same as in >> > name assignm

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Steven D'Aprano
On Tue, 22 Jul 2014 12:04:09 -0700, fl wrote: > Hi, > I learn Python function call on tutorial. There is a link on this > subject. > http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as- explained-by-philip-k-dick/ > > Although it explains clearly, the figure makes me puzzled.

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Ben Finney
fl writes: > On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: > > When you call a function, Python binds function parameter names to > > argument objects in the function's local namespace, the same as in > > name assignments. […] > > Nothing is being 'passed'. > > Thanks, but I don'

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: > When you call a function, Python binds function parameter names to > argument objects in the function's local namespace, the same as in name > assignments. Given > def f(a, b): pass > a call f(1, 'x') starts by executing > a, b = 1,

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Terry Reedy
When you call a function, Python binds function parameter names to argument objects in the function's local namespace, the same as in name assignments. Given def f(a, b): pass a call f(1, 'x') starts by executing a, b = 1, 'x' in the local namespace. Nothing is being 'passed'. -- Terry Jan

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 04:00 PM, fl wrote: On Tuesday, July 22, 2014 4:35:33 PM UTC-4, Peter Pearson wrote: On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: When you say "def reassign(list)", that means "I'm defining a function to which the caller will pass one object, and within this function I'm go

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Jerry Hill
On Tue, Jul 22, 2014 at 6:17 PM, fl wrote: > Thanks for your example. I do not find the explanation of [:] on line. Could > you > explain it to me, or where can I find it on line? It's pretty hard to find if you don't already know what's going on. First, you need to know that mylst[i:j] refers

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 4:35:33 PM UTC-4, Peter Pearson wrote: > On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: > When you say "def reassign(list)", that means "I'm defining a function > to which the caller will pass one object, and within this function I'm > going to refer to that object b

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 03:31 PM, fl wrote: I have a new question on the code. When I run it in a file on PythonWin, 'mylist' does not echo anything on the screen. While I enter the command line by line, 'mylist' shows the result: mylist [0, 1] What mechanism is involved? As a convenience, the in

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > On 07/22/2014 01:35 PM, Peter Pearson wrote: > def reassign(mylist): # no reason to shadow the list builtin > mylist[:] = [0,1] > > mylist = [1] > reassign(mylist) > mylist > > Emile I have a new question on the code. When I run it

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 03:17 PM, fl wrote: On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: On 07/22/2014 01:35 PM, Peter Pearson wrote: def reassign(mylist): # no reason to shadow the list builtin mylist[:] = [0,1] mylist = [1] reassign(mylist) mylist Emile Thanks for your example. I do

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Joel Goldstick
it copies the list On Tue, Jul 22, 2014 at 6:17 PM, fl wrote: > On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > > On 07/22/2014 01:35 PM, Peter Pearson wrote: > > def reassign(mylist): # no reason to shadow the list builtin > > mylist[:] = [0,1] > > mylist = [1] > > reassign(my

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > On 07/22/2014 01:35 PM, Peter Pearson wrote: > def reassign(mylist): # no reason to shadow the list builtin > mylist[:] = [0,1] > mylist = [1] > reassign(mylist) > mylist > Emile Thanks for your example. I do not find the explanation

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 01:35 PM, Peter Pearson wrote: On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: [snip] But I don't understand the reassign function result: def reassign(list): ... list=[0,1] ... list=[0] reassign(list) print list [0] When you say "def reassign(list)", that means "I

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Peter Pearson
On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: [snip] > > But I don't understand the reassign function result: > def reassign(list): > ... list=[0,1] > ... list=[0] reassign(list) print list > [0] When you say "def reassign(list)", that means "I'm defining a function t

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 3:32:19 PM UTC-4, Ned Batchelder wrote: > On 7/22/14 3:04 PM, fl wrote: > it is here: http://nedbatchelder.com/text/names.html > > When I enter the command lines on my computer: > I recommend putting the code into a .py file, and > running it all at once. Then if it does

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 3:04:09 PM UTC-4, fl wrote: Hi, Excuse me. I find that the OP misses some info. I rewrite it again: I learn Python function call on tutorial. There is a link on this subject. http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-di

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Ned Batchelder
On 7/22/14 3:04 PM, fl wrote: Hi, I learn Python function call on tutorial. There is a link on this subject. http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-dick/ Although it explains clearly, the figure makes me puzzled. ""Python is different. As we

Re: Question about metacharacter '*'

2014-07-07 Thread Mark Lawrence
On 07/07/2014 19:51, rxjw...@gmail.com wrote: Will you please do something about the double spaced google crap that you keep sending, I've already asked you twice. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- Th

Re: Question about metacharacter '*'

2014-07-07 Thread Devin Jeanpierre
On Mon, Jul 7, 2014 at 11:51 AM, wrote: > Would you give me an example using your pattern: `.*` -- `.`? > I try it, but it cannot pass. (of course, I use it incorrectly) Those are two patterns. Python 3.4.1 (default, Jul 7 2014, 13:22:02) [GCC 4.6.3] on linux Type "help", "copyright", "credits

Re: Question about metacharacter '*'

2014-07-07 Thread rxjwg98
On Sunday, July 6, 2014 8:09:57 AM UTC-4, Devin Jeanpierre wrote: > On Sun, Jul 6, 2014 at 4:51 AM, wrote: > > > Hi, > > > > > > I just begin to learn Python. I do not see the usefulness of '*' in its > > > description below: > > > > > > > > > > > > > > > The first metacharacter for repe

Re: Question about metacharacter '*'

2014-07-07 Thread Ian Kelly
On Sun, Jul 6, 2014 at 4:49 PM, MRAB wrote: > \d also matches more than just [0-9] in Unicode. I think that anything matched by \d will also be accepted by int(). >>> decimals = [c for c in (chr(i) for i in range(17 * 2**16)) if >>> unicodedata.category(c) == 'Nd'] >>> len(decimals) 460 >>> re.

Re: Question about metacharacter '*'

2014-07-06 Thread Devin Jeanpierre
The reason I did not use \d\d* or \d+ or ^\d+$ or any number of more-correct things was because the OP was new to regexps. -- Devin On Sun, Jul 6, 2014 at 3:49 PM, MRAB wrote: > On 2014-07-06 18:41, Albert-Jan Roskam wrote: >> >> >> >> >>> In article , >>> Rick Johnson wrote: >>> As an asi

Re: Question about metacharacter '*'

2014-07-06 Thread MRAB
On 2014-07-06 18:41, Albert-Jan Roskam wrote: In article , Rick Johnson wrote: As an aside i prefer to only utilize a "character set" when nothing else will suffice. And in this case r"[0-9][0-9]*" can be expressed just as correctly (and less noisy IMHO) as r"\d\d*". Even better, r"\d+"

Re: Question about metacharacter '*'

2014-07-06 Thread Albert-Jan Roskam
>In article , > Rick Johnson wrote: > >> As an aside i prefer to only utilize a "character set" when >> nothing else will suffice. And in this case r"[0-9][0-9]*" >> can be expressed just as correctly (and less noisy IMHO) as >> r"\d\d*". > >Even better, r"\d+" I tend tot do that too, even th

Re: Question about metacharacter '*'

2014-07-06 Thread Rick Johnson
On Sunday, July 6, 2014 12:38:23 PM UTC-5, Rick Johnson wrote: > r'\s*#[^\n]' Well, there i go not testing again! r'\s*#[^\n]*' -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about metacharacter '*'

2014-07-06 Thread Rick Johnson
On Sunday, July 6, 2014 11:47:38 AM UTC-5, Roy Smith wrote: > Even better, r"\d+" > >>> re.search(r'(\d\d*)', '111aaa222').groups() > ('111',) > >>> re.search(r'(\d+)', '111aaa222').groups() > ('111',) Yes, good catch! I had failed to reduce your original pattern down to it's most fundamental aspe

Re: Question about metacharacter '*'

2014-07-06 Thread Roy Smith
In article , Rick Johnson wrote: > As an aside i prefer to only utilize a "character set" when > nothing else will suffice. And in this case r"[0-9][0-9]*" > can be expressed just as correctly (and less noisy IMHO) as > r"\d\d*". Even better, r"\d+" >>> re.search(r'(\d\d*)', '111aaa222').grou

Re: Question about metacharacter '*'

2014-07-06 Thread Rick Johnson
[CONTINUED FROM LAST REPLY...] Likewise if your intent is to filter out any match strings which contain non-digits, then define the start and stop points of the pattern: # Match only if all are digits >>> re.match(r'\d\d*$', '111aaa222') # fails # Match only if all are digits and, # allow leadin

Re: Question about metacharacter '*'

2014-07-06 Thread Rick Johnson
On Sunday, July 6, 2014 10:50:13 AM UTC-5, Devin Jeanpierre wrote: > In related news, the regexp I gave for numbers will match "1a". Well of course it matched, because your pattern defines "one or more consecutive digits". So it will match the "1" of "1a" and the "11" of "11a" likewise. As an asi

Re: Question about metacharacter '*'

2014-07-06 Thread Devin Jeanpierre
In related news, the regexp I gave for numbers will match "1a". -- Devin On Sun, Jul 6, 2014 at 8:32 AM, MRAB wrote: > On 2014-07-06 13:09, Devin Jeanpierre wrote: >> >> On Sun, Jul 6, 2014 at 4:51 AM, wrote: >>> >>> Hi, >>> >>> I just begin to learn Python. I do not see the usefulness of '*'

Re: Question about metacharacter '*'

2014-07-06 Thread MRAB
On 2014-07-06 13:09, Devin Jeanpierre wrote: On Sun, Jul 6, 2014 at 4:51 AM, wrote: Hi, I just begin to learn Python. I do not see the usefulness of '*' in its description below: The first metacharacter for repeating things that we'll look at is *. * doesn't match the literal character *;

Re: Question about metacharacter '*'

2014-07-06 Thread Devin Jeanpierre
On Sun, Jul 6, 2014 at 4:51 AM, wrote: > Hi, > > I just begin to learn Python. I do not see the usefulness of '*' in its > description below: > > > > > The first metacharacter for repeating things that we'll look at is *. * > doesn't > match the literal character *; instead, it specifies that th

Re: Question about asyncio

2014-06-17 Thread Frank Millman
"Ian Kelly" wrote in message news:CALwzidmzG_WA5shw+PS4Y976M4DVTOwE=zb+kurvcpj3n+5...@mail.gmail.com... > On Fri, Jun 13, 2014 at 5:42 AM, Frank Millman wrote: >> Now I want to use the functionality of asyncio by using a 'yield from' to >> suspend the currently executing function at a particula

Re: Question about asyncio

2014-06-13 Thread Ian Kelly
On Fri, Jun 13, 2014 at 5:42 AM, Frank Millman wrote: > Now I want to use the functionality of asyncio by using a 'yield from' to > suspend the currently executing function at a particular point while it > waits for some information. I find that adding 'yield from' turns the > function into a gene

Re: Question on Debugging a code line

2014-05-11 Thread Mark Lawrence
On 11/05/2014 08:45, subhabangal...@gmail.com wrote: [268 lines snipped] Would you please use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line

Re: Question on Debugging a code line

2014-05-11 Thread subhabangalore
On Sunday, May 11, 2014 11:50:32 AM UTC+5:30, subhaba...@gmail.com wrote: > On Sunday, May 11, 2014 12:57:34 AM UTC+5:30, subhaba...@gmail.com wrote: > > > Dear Room, > > > > > > > > > > > > I was trying to go through a code given in > > http://en.wikipedia.org/wiki/Forward%E2%80%93backwar

Re: Question on Debugging a code line

2014-05-10 Thread subhabangalore
On Sunday, May 11, 2014 12:57:34 AM UTC+5:30, subhaba...@gmail.com wrote: > Dear Room, > > > > I was trying to go through a code given in > http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm[ Forward > Backward is an algorithm of Machine Learning-I am not talking on that > > I am

Re: Question on Debugging a code line

2014-05-10 Thread MRAB
On 2014-05-10 20:27, subhabangal...@gmail.com wrote: Dear Room, I was trying to go through a code given in http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm[ Forward Backward is an algorithm of Machine Learning-I am not talking on that I am just trying to figure out a query on it

Re: (question) How to use python get access to google search without query quota limit

2014-05-06 Thread Mark H Harris
On 5/6/14 2:27 PM, Mark Lawrence wrote: will u please send me the code that you write. actually i'm trying to learn use of google search api but i'm not getting so please mail me the code. Sure but it's USD 1,000 cash or cheque made payable to the Python Software Foundation, backed up by banke

Re: (question) How to use python get access to google search without query quota limit

2014-05-06 Thread Mark Lawrence
On 06/05/2014 15:07, shrikant aher wrote: hey, will u please send me the code that you write. actually i'm trying to learn use of google search api but i'm not getting so please mail me the code. my mail id is shrikan...@gmail.com -- Shrikant Sure but it's USD 1

Re: (question) How to use python get access to google search without query quota limit

2014-05-06 Thread alister
On Tue, 06 May 2014 19:37:14 +0530, shrikant aher wrote: > hey, > will u please send me the code that you write. actually i'm trying to > learn use of google search api but i'm not getting so please mail me the > code. my mail id is shrikan...@gmail.com it does not work like that here you show u

Re: Question about Source Control

2014-03-24 Thread Frank Millman
"Rustom Mody" wrote in message news:19d3ddc9-0fb9-476d-a117-e5f174eca...@googlegroups.com... > On Monday, March 17, 2014 6:36:33 PM UTC+5:30, Frank Millman wrote: >> Hi all > >> I know I *should* be using a Source Control Management system, but at >> present I am not. I tried to set up Mercurial

Re: Question about Source Control

2014-03-24 Thread Rustom Mody
On Monday, March 17, 2014 6:36:33 PM UTC+5:30, Frank Millman wrote: > Hi all > I know I *should* be using a Source Control Management system, but at > present I am not. I tried to set up Mercurial a couple of years ago, but I > think I set it up wrongly, as I got myself confused and found it mor

Re: Question about Source Control

2014-03-23 Thread Terry Reedy
On 3/23/2014 10:04 PM, Chris Angelico wrote: On Mon, Mar 24, 2014 at 12:26 PM, Terry Reedy wrote: With multiple branches (as with 2.7, 3.4, and default for cpython) and multiple active developers (20?) commiting to those brances, commits are definitely not free. I would not exactly call them as

Re: Question about Source Control

2014-03-23 Thread Chris Angelico
On Mon, Mar 24, 2014 at 12:26 PM, Terry Reedy wrote: > With multiple branches (as with 2.7, 3.4, and default for cpython) and > multiple active developers (20?) commiting to those brances, commits are > definitely not free. I would not exactly call them as cheap as you seem to > imply either. That

Re: Question about Source Control

2014-03-23 Thread Mark Lawrence
On 24/03/2014 01:26, Terry Reedy wrote: On 3/23/2014 6:56 PM, Chris Angelico wrote: On Mon, Mar 24, 2014 at 1:58 AM, Albert-Jan Roskam wrote: One more thing (so this is not entirely a double post!). While reading these books I found that the authors were pretty religious about Clean Commits. I

Re: Question about Source Control

2014-03-23 Thread Terry Reedy
On 3/23/2014 6:56 PM, Chris Angelico wrote: On Mon, Mar 24, 2014 at 1:58 AM, Albert-Jan Roskam wrote: One more thing (so this is not entirely a double post!). While reading these books I found that the authors were pretty religious about Clean Commits. I mean, ok, it's not a good idea to do o

Re: Question about Source Control

2014-03-23 Thread Cameron Simpson
On 24Mar2014 11:30, Chris Angelico wrote: > On Mon, Mar 24, 2014 at 11:19 AM, Cameron Simpson wrote: > > I'm particularly fond of "hg record" (or the similar extension, "hg > > crecord"), which lets you commit just parts of a modified file. > > > > When I'm in a debugging branch, it gradually tur

Re: Question about Source Control

2014-03-23 Thread Chris Angelico
On Mon, Mar 24, 2014 at 11:19 AM, Cameron Simpson wrote: > I'm particularly fond of "hg record" (or the similar extension, "hg > crecord"), which lets you commit just parts of a modified file. > > When I'm in a debugging branch, it gradually turns into a huge diff. > "hg record" lets me commit spe

Re: Question about Source Control

2014-03-23 Thread Cameron Simpson
On 24Mar2014 09:56, Chris Angelico wrote: > On Mon, Mar 24, 2014 at 1:58 AM, Albert-Jan Roskam wrote: > > One more thing (so this is not entirely a double post!). While reading > > these books I found that the authors were pretty religious about Clean > > Commits. I mean, ok, it's not a good id

Re: Question about Source Control

2014-03-23 Thread Chris Angelico
On Mon, Mar 24, 2014 at 1:58 AM, Albert-Jan Roskam wrote: > One more thing (so this is not entirely a double post!). While reading these > books I found that the authors were pretty religious about Clean Commits. I > mean, ok, it's not a good idea to do one huge monolithic commit each month, >

Re: Question about Source Control

2014-03-23 Thread Albert-Jan Roskam
> From: Dave Angel >To: python-list@python.org >Sent: Sunday, March 23, 2014 3:18 AM >Subject: Re: Question about Source Control > > >Albert-Jan Roskam Wrote in message: >> > >In addition to posting in html format,  you have

Re: Question about Source Control

2014-03-22 Thread Dave Angel
Albert-Jan Roskam Wrote in message: > In addition to posting in html format, you have also set the font size too small for me to easily read. Reason number 12 for posting in text mode in a text newsgroup. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about Source Control

2014-03-22 Thread Albert-Jan Roskam
Hi, I can recommend the book "Pragmatic Guide to Git". Very practical and to the point: http://www.amazon.com/Pragmatic-Guide-Git-Programmers/dp/1934356727/ref=sr_1_1/184-0142481-0484062?ie=UTF8&qid=1395518159&sr=8-1&keywords=pragmatic+guide+to+git I addition, I read a big fat super-exhaustive

Re: Question about Source Control

2014-03-22 Thread Tim Chase
On 2014-03-22 17:32, Albert van der Horst wrote: > >I don't know if this is a hg-vs-git way of thinking, but I tend to > >frequently commit things on a private development branch regardless > >of brokenness, but once I get it working, I flatten & clean up > >those changes ("rebase" in git terms, wh

Re: Question about Source Control

2014-03-22 Thread Albert van der Horst
In article , Gregory Ewing wrote: >Chris Angelico wrote: >> You can then offer a non-source-control means of downloading that >> specific revision. > >Just keep in mind the downside that you can't then >push or pull your changes directly back into the main >repository. You can generate a patch fi

Re: Question about Source Control

2014-03-22 Thread Albert van der Horst
In article , Tim Chase wrote: >On 2014-03-18 21:38, Terry Reedy wrote: >> At least with hg, one should best test the code in the working >> directory *before* committing to the local repository. > >I don't know if this is a hg-vs-git way of thinking, but I tend to >frequently commit things on a p

Re: Question about Source Control

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 1:49 PM, Cameron Simpson wrote: > You might do better to ask this kind of question on the mercurial list: > > http://selenic.com/mailman/listinfo/mercurial > > Someone there is bound to have wanted to do this kind of thing, and > may know if there's a tool or extension th

Re: Question about Source Control

2014-03-21 Thread Cameron Simpson
On 22Mar2014 09:17, Chris Angelico wrote: > On Sat, Mar 22, 2014 at 8:32 AM, Cameron Simpson wrote: > > Basicly, run "hg log" for the file, and examine each of the diffs > > WRT to your target line. > > > > Refactoring raises the bar somewhat. > > Here's one where git and hg are a lot more diffe

Re: Question about Source Control

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 8:32 AM, Cameron Simpson wrote: > Basicly, run "hg log" for the file, and examine each of the diffs > WRT to your target line. > > Refactoring raises the bar somewhat. Here's one where git and hg are a lot more different. When I'm trying to find the origin of some line of

Re: Question about Source Control

2014-03-21 Thread Cameron Simpson
On 21Mar2014 08:23, Roy Smith wrote: > In article , > Cameron Simpson wrote: > > > hg blame bin/set-x > > > > and the output goes: > > > > [hg/css]fleet*> hg blame bin/set-x > > 2186: #!/bin/sh > > 11359: # > > 11359: # Trace execution of a command. > > There's two things

Re: Question about Source Control

2014-03-21 Thread Tim Chase
On 2014-03-21 12:54, Tim Chase wrote: > A quick "hg -help blame" Sigh. Accidentally hit when I meant to hit with down. That is, of course "hg help blame", formerly written there as "hg -v help blame" and accidentally sent mid-edit. -tkc -- https://mail.python.org/mailman/listinfo/python-li

Re: Question about Source Control

2014-03-21 Thread Tim Chase
On 2014-03-22 04:23, Chris Angelico wrote: > > The hard thing is I don't really want to know which change most > > recently touched the line of text. I want to know who really > > wrote it. It would be wonderful if hg were smart enough to be > > able to back-track through the change history and i

Re: Question about Source Control

2014-03-21 Thread Chris Angelico
On Fri, Mar 21, 2014 at 11:23 PM, Roy Smith wrote: > There's two things hg blame doesn't do which would be useful. > > First, the trivial one. I don't want lines annotated by change number, > I want them annotated by the name of the person who checked it in. But, > I'm sure that can be easily fi

Re: Question about Source Control

2014-03-21 Thread Roy Smith
In article , Cameron Simpson wrote: > hg blame bin/set-x > > and the output goes: > > [hg/css]fleet*> hg blame bin/set-x > 2186: #!/bin/sh > 11359: # > 11359: # Trace execution of a command. There's two things hg blame doesn't do which would be useful. First, the trivial o

Re: Question about Source Control

2014-03-20 Thread Cameron Simpson
On 21Mar2014 07:40, Frank Millman wrote: > "Cameron Simpson" wrote in message > news:20140321013313.ga58...@cskk.homeip.net... > > Someone intending to clone the project and develop will probably > > want the whole repository; as Gregory says - they can then easily > > push/pull with others. > >

Re: Question about Source Control

2014-03-20 Thread Chris Angelico
On Fri, Mar 21, 2014 at 4:40 PM, Frank Millman wrote: > To make the software available to anyone who just wants to run a stable > version, copy the working directory of the 'major release' repository to a > directory of its own, without the .hg stuff, and make it available for > download. > > For

Re: Question about Source Control

2014-03-20 Thread Frank Millman
"Cameron Simpson" wrote in message news:20140321013313.ga58...@cskk.homeip.net... > > Someone intending to clone the project and develop will probably > want the whole repository; as Gregory says - they can then easily > push/pull with others. > > For Frank, the size of the repo is not the size

Re: Question about Source Control

2014-03-20 Thread Cameron Simpson
On 21Mar2014 13:14, Chris Angelico wrote: > On Fri, Mar 21, 2014 at 12:33 PM, Cameron Simpson wrote: > > Regarding having Mercurial installed, that is very easy, and after > > you've gone (eg): > > > > hg clone https://bitbucket.org/cameron_simpson/css > > my-copy-of-cameron's-css > > > > (or

Re: Question about Source Control

2014-03-20 Thread Chris Angelico
On Fri, Mar 21, 2014 at 12:33 PM, Cameron Simpson wrote: > Regarding having Mercurial installed, that is very easy, and after > you've gone (eg): > > hg clone https://bitbucket.org/cameron_simpson/css my-copy-of-cameron's-css > > (or wherever the public repository is published), you can of cours

Re: Question about Source Control

2014-03-20 Thread Cameron Simpson
On 21Mar2014 09:34, Chris Angelico wrote: > On Fri, Mar 21, 2014 at 9:19 AM, Gregory Ewing > > Also, unless the project is truly ancient, the > > whole history might not be as big as you expect. > > The code presumably grew to its present size > > incrementally, in an approximately monotonic > > m

Re: Question about Source Control

2014-03-20 Thread Chris Angelico
On Fri, Mar 21, 2014 at 9:19 AM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> You can then offer a non-source-control means of downloading that >> specific revision. > > Just keep in mind the downside that you can't then > push or pull your changes directly back into the main > repository. Y

Re: Question about Source Control

2014-03-20 Thread Gregory Ewing
Chris Angelico wrote: You can then offer a non-source-control means of downloading that specific revision. Just keep in mind the downside that you can't then push or pull your changes directly back into the main repository. You can generate a patch file for the project maintainer to apply, howe

Re: Question about Source Control

2014-03-20 Thread Chris Angelico
On Thu, Mar 20, 2014 at 5:48 PM, Frank Millman wrote: > One thing still confuses me. Over the lifetime of a project, there could be > many thousands of changesets. Some of those could be tagged as 'major > releases'. Someone wishing to clone the project from scratch may want to > start from the la

Re: Question about Source Control

2014-03-20 Thread Frank Millman
"Frank Millman" wrote in message news:lgbe6g$j9o$1...@ger.gmane.org... > > > To recap my basic setup, I have machine A which holds the source > directory, machine B which is used to edit the program, and machines B and > C which are both used to run the program. > > Initially, to prove that I u

Re: Question about Source Control

2014-03-19 Thread Chris Angelico
On Wed, Mar 19, 2014 at 5:41 PM, Frank Millman wrote: > I have decided to stick with Mercurial, simply because that is what I used > in my previous attempt and I felt comfortable with it. That's the best reason for choosing, really. https://github.com/Rosuav/Gypsum/commit/0f973 > Also I believe t

Re: Question about Source Control

2014-03-18 Thread Frank Millman
"Frank Millman" wrote in message news:lg6s09$irl$1...@ger.gmane.org... > Hi all > > I know I *should* be using a Source Control Management system, but at > present I am not. I tried to set up Mercurial a couple of years ago, but I > think I set it up wrongly, as I got myself confused and found

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Wed, Mar 19, 2014 at 1:12 PM, Tim Chase wrote: > On 2014-03-18 21:38, Terry Reedy wrote: >> At least with hg, one should best test the code in the working >> directory *before* committing to the local repository. > > I don't know if this is a hg-vs-git way of thinking, but I tend to > frequentl

Re: Question about Source Control

2014-03-18 Thread Tim Chase
On 2014-03-18 21:38, Terry Reedy wrote: > At least with hg, one should best test the code in the working > directory *before* committing to the local repository. I don't know if this is a hg-vs-git way of thinking, but I tend to frequently commit things on a private development branch regardless

Re: Question about Source Control

2014-03-18 Thread Terry Reedy
On 3/18/2014 5:51 PM, Gregory Ewing wrote: Frank Millman wrote: These are the kind of stumbling blocks that prevented me from succeeding in my previous attempt. I have a vague recollection that I set it up on machine A, but then hit a problem because machines B and C both accessed the same direc

Re: Question about Source Control

2014-03-18 Thread Gregory Ewing
Frank Millman wrote: These are the kind of stumbling blocks that prevented me from succeeding in my previous attempt. I have a vague recollection that I set it up on machine A, but then hit a problem because machines B and C both accessed the same directory, but with different names For deali

Re: Question about Source Control

2014-03-18 Thread Dave Angel
Steven D'Aprano Wrote in message: > On Tue, 18 Mar 2014 19:08:17 +1100, Chris Angelico wrote: > >> On Tue, Mar 18, 2014 at 6:55 PM, Steven D'Aprano >> wrote: >>> I don't think that *version* control is the right model to describe >>> what hg and git do, although it may be appropriate for subve

Re: Question about Source Control

2014-03-18 Thread Mark H Harris
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,

Re: Question about Source Control

2014-03-18 Thread Steven D'Aprano
On Tue, 18 Mar 2014 19:08:17 +1100, Chris Angelico wrote: > On Tue, Mar 18, 2014 at 6:55 PM, Steven D'Aprano > wrote: >> I don't think that *version* control is the right model to describe >> what hg and git do, although it may be appropriate for subversion. hg >> doesn't manage *versions*, it ma

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 6:55 PM, Steven D'Aprano wrote: > I don't think that *version* control is the right model to describe what > hg and git do, although it may be appropriate for subversion. hg doesn't > manage *versions*, it manages changes to source code ("changesets"). Meh... Is there any

Re: Question about Source Control

2014-03-18 Thread Steven D'Aprano
On Tue, 18 Mar 2014 17:47:51 +1100, Ben Finney wrote: > "Frank Millman" writes: > >> I feel that I have just not grasped the basics yet, so any assistance >> that puts me on the right path is appreciated. > > Here is “Hg Init”, a tutorial for Mercurial http://hginit.com/>. > > (“source control

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 5:47 PM, Ben Finney wrote: > (“source control” is not the most common term for this; what we're > talking about is a “version control system”, or VCS. But some Git users > may disagree.) People use different terms depending on their backgrounds, I think. I've heard a good

Re: Question about Source Control

2014-03-18 Thread Frank Millman
"Ben Finney" wrote in message news:85y508roiw@benfinney.id.au... > "Frank Millman" writes: > >> I feel that I have just not grasped the basics yet, so any assistance >> that >> puts me on the right path is appreciated. > > Here is "Hg Init", a tutorial for Mercurial http://hginit.com/>. >

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 5:42 PM, Frank Millman wrote: > Excuse my ignorance, but how does it actually work? Ignorance not only excused, but welcomed. :) However, caveat: I know how git is set up, but not hg. Someone else can fill in the details; for now, I'll explain git and hope that hg is broad

Re: Question about Source Control

2014-03-17 Thread Frank Millman
"Andriy Kornatskyy" wrote in message news:blu0-smtp953c8572b5ca6374830e5091...@phx.gbl... > Frank, > > I would suggest start with an account on https://bitbucket.org. It > supports private repositories so you should be good there. > > From other hand you can setup own infrastructure for SCM, re

Re: Question about Source Control

2014-03-17 Thread Ben Finney
"Frank Millman" writes: > I feel that I have just not grasped the basics yet, so any assistance that > puts me on the right path is appreciated. Here is “Hg Init”, a tutorial for Mercurial http://hginit.com/>. (“source control” is not the most common term for this; what we're talking about is

<    3   4   5   6   7   8   9   10   11   12   >