On May 6, 1:00 pm, hdante <[EMAIL PROTECTED]> wrote: > On May 6, 12:28 am, [EMAIL PROTECTED] wrote: > > > > > > > > > There's a process decorator to functions in a module. > > > [supposes] > > > @process > > def datafile( processdict ): > > processdict.modify( ) > > op= yield > > op.call( ) in processdict > > # op.call( ) in namespace > > > More simply: > > > @process > > def datafile( processdict ): > > processdict.modify( ) > > interaction_object= yield > > invoke( interaction_object, processdict ) > > #or interaction_object.invoke( **processdict ) > > processdict.commit( ) > > > Making each execution of process a self-modifying disk file. > > Interaction_object could be binary or text. If text, we'd have a > > cross-language executable, but I'm suspicious it wouldn't be vacuous > > as a Python of Python composition: would other languages pass other > > than Python programs? > > > I think relational databases are the only in there. In other words, I > > think Python would make a wholly better stored procedure and query > > language than those of databases. Certainly I'm suspicious that's > > naivete speaking up; I question, would it? Is there more risk of or > > opportunity for malicious execution? Simply put, can we get > > primitives in to databases? What's an example of a [optionally real] > > operation on the primitives that doesn't map pretty well into SQL? > > How do you want to write base-case scenarios if they're going to be > > literals? > > Datafiles could be implemented with SQL. Consider SQL: > > SELECT * FROM process_dict where id = 1 > . > SELECT * FROM process_dict where id = 1 > > Obviously, this is all a supposition, I'm not claiming the code is > perfect (or am I ?). If datafiles could be implemented with SQL and > storing text requires datafiles, then I can store text with datafiles > (haha !). Would you consider doing this ? One could even store python > decorated serialized code using SQL [supposition]. But would it be > useful [haha !] ? > > I don't know.- Hide quoted text - > > - Show quoted text -
Serialized code has line numbers, which is fine in Python. (Tab- indent even comes easier, though it's not clear what granularity you're storing at, whether each "indention block" gets its own table or not.) You are asking for a per-object table. a= { } b= [ ] a[ 'what' ]= object( ) id= new_id( ) process_vars[ id ]= object( ) insert into process_dict.variable_9782 values ( id ) insert into process_dict.variable_9371 values ( 'what', NONPRIMITIVE, id ) b.append( None ) insert into process_dict.variable_8224 values ( NULL ) b.insert( 0, 0 ) update process_dict.variable_8224 set "column_1"= 0 where index= 0 -- http://mail.python.org/mailman/listinfo/python-list